Download E-books Programming Elixir PDF

By Dave Thomas

As a developer, you’ve most likely heard that useful programming ideas aid deal with the complexities of today’s real-world, concurrent structures. You’re additionally investigating designs that assist you maximize uptime and deal with security.

This ebook is your consultant to Elixir, a contemporary, useful, and concurrent programming language. simply because Elixir runs at the Erlang VM, and makes use of the underlying Erlang/OTP structure, it advantages from virtually two decades of analysis into excessive functionality, hugely parallel, and heavily strong purposes. Elixir brings much that’s new: a contemporary, Ruby-like, extendable syntax, bring together and runtime overview, a hygienic macro process, and more.

But, simply as importantly, Elixir brings a feeling of delight to parallel, sensible programming. Your purposes turn into enjoyable to paintings with, and the language encourages you to experiment.

Part 1 covers the fundamentals of writing sequential Elixir courses. We’ll examine the language, the instruments, and the conventions.

Part 2 makes use of those talents to begin writing concurrent code—applications that use all of the cores in your computing device, or all of the machines in your community! And we do it either with and with no OTP.

And half three seems on the extra complicated positive factors of the language, from DSLs and code iteration to extending the syntax.

By the top of this ebook, you’ll comprehend Elixir, and know the way to use it to resolve your advanced, smooth difficulties.

Show description

Read or Download Programming Elixir PDF

Best Programming books

Herb Schildt's C++ Programming Cookbook

Your final "How-To" consultant to C++ Programming! mythical programming writer Herb Schildt stocks a few of his favourite programming innovations during this high-powered C++ "cookbook. " prepared for speedy reference, every one "recipe" exhibits tips on how to accomplish a pragmatic programming activity. A recipe starts with an inventory of key constituents (classes, capabilities, and headers) through step by step directions that exhibit find out how to gather them right into a entire resolution.

Structure and Interpretation of Computer Programs - 2nd Edition (MIT Electrical Engineering and Computer Science)

Constitution and Interpretation of computing device courses has had a dramatic impression on machine technology curricula over the last decade. This long-awaited revision comprises adjustments through the textual content. There are new implementations of lots of the significant programming structures within the e-book, together with the interpreters and compilers, and the authors have integrated many small alterations that replicate their adventure educating the path at MIT because the first version was once released.

Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition)

“Every C++ specialist wishes a replica of powerful C++. it really is an absolute must-read for an individual contemplating doing critical C++ improvement. If you’ve by no means learn potent C++ and also you imagine you recognize every little thing approximately C++, reassess. ”— Steve Schirripa, software program Engineer, Google “C++ and the C++ group have grown up within the final fifteen years, and the 3rd variation of potent C++ displays this.

Software Testing with Visual Studio 2010 (Microsoft Windows Development Series)

Use visible Studio 2010’s leap forward trying out instruments to enhance caliber in the course of the whole software program Lifecycle   jointly, visible Studio 2010 final, visible Studio try expert 2010, Lab administration 2010, and crew origin Server provide Microsoft builders the main subtle, well-integrated trying out answer they’ve ever had.

Additional resources for Programming Elixir

Show sample text content

It wasn’t tricky, however it was once tedious. Our scheduler additionally needed to continue song of 3 items of kingdom info: the queue of numbers to procedure, the implications generated to date, and the record of energetic PIDs. such a lot servers have an analogous set of wishes, so OTP offers libraries that do all of the low-level paintings for us. after we write an OTP server, we write a module containing a number of callback capabilities with average names. OTP will invoke definitely the right callback to deal with a specific state of affairs. for instance, while somebody sends a request to our server, OTP will name our handle_call functionality, passing within the request, the caller, and the present server country. Our functionality responds by way of returning a tuple containing an motion to take, the go back price for the request, and an up-to-date nation. kingdom and the only Server long ago after we summed the weather in a list,, we came upon the belief of an accumulator, a price that used to be handed as a parameter whilst a looping functionality calls itself recursively. lists/sum. exs defmodule MyList do def sum([], total), do: overall def sum([ head | tail ], total), do: sum(tail, head+total) finish The parameter overall keeps the nation whereas the functionality trundles down the checklist. In our Fibonacci code, we maintained loads of country within the schedule_processes functionality. in reality, all 3 of its parameters have been used for country info. Now take into consideration servers. They use recursion to loop, dealing with one request on every one name. to allow them to additionally go nation to themselves as a parameter during this recursive name. And that’s one of many issues OTP manages for us. Our handler capabilities get handed the present country (as their final parameter), they usually go back (among different issues) a in all probability up to date kingdom. no matter what country a functionality returns is the kingdom that may be handed to the following request handler. Our First OTP Server Let’s write what's in all likelihood the easiest OTP server. You cross it a bunch if you happen to commence it up, and that turns into the present country of the server. in case you name it with a :next_number request, it returns that present kingdom to the caller, and whilst increments the nation, prepared for the subsequent name. essentially, every time you name it you get an up-to-date series quantity. Create a brand new venture utilizing combine commence via making a new combine venture on your paintings listing. We’ll name it series. $ combine new series * growing README. md * growing . gitignore * developing combine. exs * developing lib * growing lib/sequence. ex * developing lib/sequence * growing attempt * developing test/test_helper. exs * developing test/sequence_test. exs Create the fundamental series Server Now we’ll create series. Server, our server module. upload the dossier server. ex to the series/ listing below lib. otp-server/1/sequence/lib/sequence/server. ex Line 1defmodule series. Server do 2 use GenServer three four def handle_call(:next_number, _from, current_number) do five { :reply, current_number, current_number+1 } 6 finish 7 finish the very first thing to notice is line 2.

Rated 4.57 of 5 – based on 8 votes