general-purpose programming language

27 results back to index


Terraform: Up and Running: Writing Infrastructure as Code by Yevgeniy Brikman

Amazon Web Services, cloud computing, DevOps, en.wikipedia.org, full stack developer, general-purpose programming language, Ruby on Rails

Running an ad hoc script on your server For example, here is a Bash script called setup-webserver.sh that configures a web server by installing dependencies, checking out some code from a Git repo, and firing up the Apache web server: # Update the apt-get cache sudo apt-get update # Install PHP sudo apt-get install -y php # Install Apache 20 | Chapter 1: Why Terraform sudo apt-get install -y apache2 # Copy the code from repository sudo git clone https://github.com/brikis98/php-app.git /var/www/html/app # Start Apache sudo service apache2 start The great thing about ad hoc scripts is that you can use popular, general-purpose pro‐ gramming languages and you can write the code however you want. The terrible thing about ad hoc scripts is that you can use popular, general-purpose programming languages and you can write the code however you want. Whereas tools that are purpose-built for IAC provide concise APIs for accomplishing complicated tasks, if you’re using a general-purpose programming language, you have to write completely custom code for every task. Moreover, tools designed for IAC usually enforce a particular structure for your code, whereas with a general-purpose programming language, each developer will use their own style and do something different. Neither of these problems is a big deal for an eight-line script that installs Apache, but it gets messy if you try to use ad hoc scripts to manage hundreds of servers, databases, load balancers, network configurations, and so on.

Two environments, each with its own load balancer, web server cluster, and database With just a staging environment, the file layout for your Terraform code looked something like this: stage └ services └ webserver-cluster └ main.tf └ (etc) └ data-stores └ mysql └ main.tf └ (etc) global └ s3 └ main.tf └ (etc) If you were to add a production environment, you’d end up with the following file layout: stage └ services └ webserver-cluster └ main.tf └ (etc) 98 | Chapter 4: How to create reusable infrastructure with Terraform modules └ data-stores └ mysql └ main.tf └ (etc) prod └ services └ webserver-cluster └ main.tf └ (etc) └ data-stores └ mysql └ main.tf └ (etc) global └ s3 └ main.tf └ (etc) How do you avoid duplication between the staging and production environments? How do you avoid having to copy and paste all the code in stage/services/ webserver-cluster into prod/services/webserver-cluster and all the code in stage/data-stores/mysql into prod/data-stores/mysql? In a general-purpose programming language (e.g. Ruby, Python, Java), if you had the same code copied and pasted in several places, you could put that code inside of a function and reuse that function in multiple places throughout your code: def example_function() puts "Hello, World" end # Other places in your code example_function() With Terraform, you can put your code inside of a Terraform module and reuse that module in multiple places throughout your code.

Even the database details are hard-coded because the main.tf file you copied into modules/services/webservercluster is using a terraform_remote_state data source to figure out the database address and port, and that terraform_remote_state is hard-coded to look at the staging environment. To fix these issues, you need to add configurable inputs to the webserver-cluster module so it can behave differently in different environments. Module inputs To make a function configurable in a general-purpose programming language, you can add input parameters to that function: def example_function(param1, param2) puts "Hello, #{param1} #{param2}" end # Other places in your code example_function("foo", "bar") In Terraform, modules can have input parameters too. To define them, you use a mechanism you’re already familiar with: input variables. Open up modules/serv ices/webserver-cluster/vars.tf and add three new input variables: variable "cluster_name" { description = "The name to use for all the cluster resources" } variable "db_remote_state_bucket" { description = "The name of the S3 bucket for the database's remote state" } variable "db_remote_state_key" { 102 | Chapter 4: How to create reusable infrastructure with Terraform modules description = "The path for the database's remote state in S3" } Next, go through modules/services/webserver-cluster/main.tf and use var.cluster_name instead of the hard-coded names (e.g. instead of “terraform-asgexample”).


pages: 496 words: 174,084

Masterminds of Programming: Conversations With the Creators of Major Programming Languages by Federico Biancuzzi, Shane Warden

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Benevolent Dictator For Life (BDFL), business intelligence, business process, cellular automata, cloud computing, commoditize, complexity theory, conceptual framework, continuous integration, data acquisition, domain-specific language, Douglas Hofstadter, Fellow of the Royal Society, finite state, Firefox, follow your passion, Frank Gehry, general-purpose programming language, Guido van Rossum, HyperCard, information retrieval, iterative process, John von Neumann, Larry Wall, linear programming, loose coupling, Mars Rover, millennium bug, NP-complete, Paul Graham, performance metric, Perl 6, QWERTY keyboard, RAND corporation, randomized controlled trial, Renaissance Technologies, Ruby on Rails, Sapir-Whorf hypothesis, Silicon Valley, slashdot, software as a service, software patent, sorting algorithm, Steve Jobs, traveling salesman, Turing complete, type inference, Valgrind, Von Neumann architecture, web application

If you can instead create your domain-specific language out of a base that is a general-purpose programming language, then I think you’re much better off than starting out fresh every time. One of the things that is problematic with general-purpose programming languages today is they’re getting better at creating internal DSLs, and you could view LINQ as an example of that. But what they’re not good at currently is capturing the correct usage patterns of those internal DSLs. In some ways, when you create internal DSLs you actually want to limit the things that you can do with the general-purpose programming language. You want to be able to shut off the general-purposeness of the language, and you want to only reveal it in certain spots in your DSL. That’s one thing that general-purpose programming languages are not very good at right now.

Was this due to their genesis as little languages, without consideration of evolving them into general-purpose languages? Brian: Yes, I think that’s what it is. I’m speaking only for myself on this, but the mental picture that I have started out with is almost always a little language, something very small and simple, not meant to do big things, not meant to be a general-purpose programming language. But if it’s useful, people start to push its limits and they want more. And typically the things they want are the features of general-purpose programming languages that make them programmable rather than just declarative. They want ways to repeat things, they want ways to avoid having to say the same thing over and over again, and these lead to loops and macros or functions. How can we design a language that works for everybody? You mentioned little languages that are focused on a particular goal, but I also have the impression that you like the idea that a developer writes a language to satisfy his own needs.

During the year we wrote the AWK book, many of the programs in it became 50% shorter. This is because we learned how to use the abstractions in AWK even more effectively than we initially had thought. Did you find deficiencies in the design of AWK when you wrote the book? Al: When people started using AWK for many other tasks than we initially thought, it exposed certain aspects of the language where we hadn’t intended it to be a general-purpose programming language. I wouldn’t call these “deficiencies,” but it showed that AWK was a specialized language that was not intended for some of the applications that people were trying to use it for. Were you able to address some of those, or did you strongly resist making AWK more general purpose? Al: After the initial version of AWK was created, the language evolved for about a decade with the addition of new constructs and new operators, but it stayed a pattern-action language, a language that was intended for solving data-processing problems.


pages: 923 words: 516,602

The C++ Programming Language by Bjarne Stroustrup

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

combinatorial explosion, conceptual framework, database schema, distributed generation, Donald Knuth, fault tolerance, general-purpose programming language, index card, iterative process, job-hopping, locality of reference, Menlo Park, Parkinson's law, premature optimization, sorting algorithm

., that makes the result of such work available to thousands is a way for programmers and designers to escape the trap of becoming craftsmen of one-of-a-kind artifacts. It is most important that a specification system or a foundation library be able to interface effectively with a general-purpose programming language. Otherwise, the framework provided is inherently limiting. This implies that specification systems and direct-manipulation systems that generate code at a suitable high level into an accepted general-purpose programming language have a great advantage. A proprietary language is a long-term advantage to its provider only. If the code generated is so low-level that general code added must be written without the benefits of abstraction, then reliability, maintainability, and economy are lost. In essence, a generation system should The C++ Programming Language, Third Edition by Bjarne Stroustrup.

Chapters 1 through 10 give a tutorial introduction; Chapters 11 through 13 provide a discussion of design and software development issues; and, finally, the complete C++ reference manual is included. Naturally, the features added and resolutions made since the original edition are integral parts of the presentation. They include refined overloading resolution, memory management facilities, and access control mechanisms, type-safe linkage, ccoonnsstt and ssttaattiicc member functions, abstract classes, multiple inheritance, templates, and exception handling. C++ is a general-purpose programming language; its core application domain is systems programming in the broadest sense. In addition, C++ is successfully used in many application areas that are not covered by this label. Implementations of C++ exist from some of the most modest microcomputers to the largest supercomputers and for almost all operating systems. Consequently, this book describes the C++ language itself without trying to explain a particular implementation, programming environment, or library.

Also thanks to the many participants of the ‘‘external reviews’’ of the reference manual drafts and to the people who suffered through the first year of X3J16. Murray Hill, New Jersey Bjarne Stroustrup The C++ Programming Language, Third Edition by Bjarne Stroustrup. Copyright ©1997 by AT&T. Published by Addison Wesley Longman, Inc. ISBN 0-201-88954-4. All rights reserved. Preface to the First Edition Language shapes the way we think, and determines what we can think about. – B.L.Whorf C++ is a general purpose programming language designed to make programming more enjoyable for the serious programmer. Except for minor details, C++ is a superset of the C programming language. In addition to the facilities provided by C, C++ provides flexible and efficient facilities for defining new types. A programmer can partition an application into manageable pieces by defining new types that closely match the concepts of the application.


pages: 199 words: 47,154

Gnuplot Cookbook by Lee Phillips

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

bioinformatics, computer vision, general-purpose programming language, pattern recognition, statistical model, web application

I have compiled the latest version (4.4) of gnuplot on both Linux and Macintosh (OS X) computers and verified that all of its advanced features are fully available on both of these architectures. The recipes in this book that illustrate features newly appearing in version 4.4 are marked with [new]. gnuplot can easily be automated. It has its own scripting language and can be controlled from many general-purpose programming languages. gnuplot can also be incorporated into various publishing and document creation workflows to help create professional books, papers, and online documents. Why this book? Because of gnuplot's many years of deployment and sophisticated community of expert users, help is usually easy to find in some form. If you are trying to solve a tricky plotting problem, there is a reasonable chance that someone online has either figured it out or is willing to share some ideas about how it might be done.

Fortunately, gnuplot, as part of its command language, includes a simple facility for applying some basic programming constructs. There is a basic looping control, a way to iterate over a set of commands, and an if—then—else statement. With these few borrowings from procedural languages, we can do a great deal; and, as we shall see later on in the chapter, if we need more, we can control gnuplot from within almost any general-purpose programming language. In the following figure, the Bessel function is plotted five times, each time with its argument scaled differently, with a different linetype for each curve, and with a curve title for the legend constructed individually for each plot: How to do it… The previous graph could have been made by issuing five individual plot commands, but in fact was produced with a single line highlighted in the following gnuplot script: set term pngcairo mono dashed enhanced set out "file.png" set rmargin at screen .8 set key at screen 1,.7 plot [0 : 3] for [n = 1 : 10 : 2] besj0(n*x) title "J_0(".n."


pages: 448 words: 71,301

Programming Scala by Unknown

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

domain-specific language, en.wikipedia.org, fault tolerance, general-purpose programming language, loose coupling, type inference, web application

Today, concurrency, heterogeneity, always-on services, and ever-shrinking development schedules are driving interest in functional programming (FP). It appears that the dominance of object-oriented programming may be over. Mixing paradigms is becoming popular, even necessary. We gravitated to Scala from other languages because Scala embodies many of the optimal qualities we want in a general-purpose programming language for the kinds of applications we build today: reliable, high-performance, highly concurrent Internet and enterprise applications. xvii Download at WoweBook.Com Scala is a multi-paradigm language, supporting both object-oriented and functional programming approaches. Scala is scalable, suitable for everything from short scripts up to large-scale, component-based applications. Scala is sophisticated, incorporating state-of-the-art ideas from the halls of computer science departments worldwide.

However, when a DSL is appropriate for an application—e.g., when it would be used frequently to implement and change functionality—a well-designed DSL can be a powerful tool for building flexible and robust applications. From the implementation point of view, DSLs are often classified as internal and external. An internal (sometimes called embedded) DSL is an idiomatic way of writing code in a general-purpose programming language, like Scala. No special-purpose parser is necessary for internal DSLs. Instead, they are parsed just like any other code written in the language. In contrast, an external DSL is a custom language with its own custom grammar and parser. Internal DSLs are easier to create because they don’t require a special-purpose parser. On the other hand, the constraints of the underlying language limit the options for expressing domain concepts.

Design Pattern A solution to a problem in a context. A code idiom or design structure that satisfies the 396 | Glossary Download at WoweBook.Com Free Variable needs of a frequently occurring problem, constraint, requirement, etc. Domain-Specific Language A custom programming language that resembles the terms, idioms, and expressions of a particular domain. An internal DSL is an idiomatic form of a general-purpose programming language. That is, no specialpurpose parser is created for the language. Instead, DSL code is written in the generalpurpose language and parsed just like any other code. An external DSL is a language with its own grammar and parser. Duck Typing A term used in languages with dynamic typing for the way method resolution works. As long as an object accepts a method call (message send), the runtime is satisfied.

Practical OCaml by Joshua B. Smith

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

cellular automata, Debian, domain-specific language, general-purpose programming language, Grace Hopper, hiring and firing, John Conway, Paul Graham, slashdot, text mining, Turing complete, type inference, web application, Y2K

Programming in OCaml will also make you much more aware of types in your code, even if the other languages you program in are not statically typed. A solid understanding of types and their meanings can help nearly all programmers. OCaml will not—at least yet—provide you with shiny resume bullet points. But it will enable you to solve problems faster, with less code and fewer bugs. What Is OCaml Good For? OCaml is a general-purpose programming language, which means that you can program anything in it. However, programming languages are often designed with certain problem domains in mind, and OCaml has areas in which it excels more than others. One of these is in the area of “safe” applications (used here to indicate more than securityrelated safety). Not only is OCaml garbage collected, but most types are boxed. This means that buffer overruns and similar runtime failures cannot happen in OCaml programs.

Text mining and log file analysis are two areas in which having a lexer/parser combination can result in better code and easier maintenance. A Small Discussion of Small Languages DSLs are programming languages that are focused on one problem domain. That problem domain can be anything: text processing, image manipulation, configuration, page layout, and so on. This focus on a single domain is what separates DSLs from general-purpose programming languages such as OCaml. OCaml is designed to be able to solve problems in a variety of problem domains. DSLs can be a real boon in complicated programs. These languages are often called “extension” languages because they are designed to extend some core functionality. The Emacs text editor, with its extension language Emacs Lisp, is probably one of the best examples of how powerful having an extension language can be.

When I talk about web programming, I am talking about CGI and CGI-like programming. OCaml is not designed to be a web programming language like PHP. Because PHP was designed originally to be a web programming language, it includes many features and functions that provide webcentric functionality (for example, the way PHP allows HTML to be intermingled with PHP code). OCaml was designed to be a general-purpose programming language. As such, it does not focus on one area of deployment, like the web. That doesn’t make it less effective for web programming, but it does mean that the approach to web development taken by the language is 273 620Xch21final.qxd 274 9/22/06 12:27 AM Page 274 CHAPTER 21 ■ PRACTICAL: WEB PROGRAMMING different. OCaml programs can be run as CGI programs, or you can even write a web server in OCaml and execute web-based applications that way.


pages: 263 words: 20,730

Exploring Python by Timothy Budd

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

c2.com, centre right, general-purpose programming language, Guido van Rossum, index card, random walk, sorting algorithm, web application

Lastly, by encouraging you to experiment in the discovery of simple information, I hope to instill habits that you will continue to carry with you throughout your programming career. Together, the intent is that active learning helps you more easily retain and use the information you have learned. Exploring Python – Preface 3 What is Python? For those looking for buzzwords, Python is a high-level, interpreted, reflective, dynamically-typed, open-source, multi-paradigm, general-purpose programming language. I could explain each of those terms in detail, but in the end the result would still not convey what makes Python programming different from other languages. There is no one thing in Python that is not found in other languages, but it is the elegant design and combination of these features into a single package that makes Python such a pleasure to use. Python is sometimes described as a scripting language, for the simple reason that thousands of working programmers daily use the language in this fashion.

Hint 6: Determine the class of problems the language was designed to solve. Languages do not develop in isolation; they are created for a reason, usually a specific type of problem. Study the type of problems the language is being used to address. Try to understand what features of the language make this type of problem easier, and why those same features might make other types of problems difficult. Python is described as a general purpose programming language. However, the very same features that on the positive side contribute to rapid code development and ease of use are also features that on the negative side can consume a lot of execution time. These features include dynamic typing, infinite precision integers, and high level data structures such as lists and dictionaries. In the vast majority of cases machines now days are so fast that the user will not notice the execution time cost, and the benefits will outweigh the drawbacks.


pages: 509 words: 92,141

The Pragmatic Programmer by Andrew Hunt, Dave Thomas

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

A Pattern Language, Broken windows theory, business process, buy low sell high, c2.com, combinatorial explosion, continuous integration, database schema, domain-specific language, don't repeat yourself, Donald Knuth, general-purpose programming language, George Santayana, Grace Hopper, if you see hoof prints, think horses—not zebras, index card, loose coupling, Menlo Park, MVC pattern, premature optimization, Ralph Waldo Emerson, revision control, Schrödinger's Cat, slashdot, sorting algorithm, speech recognition, traveling salesman, urban decay, Y2K

Each of these users has their own problem domain, and you can generate mini-environments and languages for all of them. Domain-Specific Errors If you are writing in the problem domain, you can also perform domain-specific validation, reporting problems in terms your users can understand. Take our switching application on on the facing page. Suppose the user misspelled the format name: From X25LINE1 (Format=AB123) If this happened in a standard, general-purpose programming language, you might receive a standard, general-purpose error message: Syntax error: undeclared identifier But with a mini-language, you would instead be able to issue an error message using the vocabulary of the domain: "AB123" is not a format. Known formats are ABC123, XYZ43B, PDQB, and 42. Implementing a Mini-Language At its simplest, a mini-language may be in a line-oriented, easily parsed format.

It forces you to create a more robust, abstract design by deferring details—deferring them all the way out of the program. You can customize the application without recompiling it. You can also use this level of customization to provide easy work-arounds for critical bugs in live production systems. Metadata can be expressed in a manner that's much closer to the problem domain than a general-purpose programming language might be (see Domain Languages, page 57). You may even be able to implement several different projects using the same application engine, but with different metadata. We want to defer definition of most details until the last moment, and leave the details as soft—as easy to change—as we can. By crafting a solution that allows us to make changes quickly, we stand a better chance of coping with the flood of directional shifts that swamp many projects (see Reversibility, page 44).


pages: 761 words: 80,914

Ansible: Up and Running: Automating Configuration Management and Deployment the Easy Way by Lorin Hochstein

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Amazon Web Services, cloud computing, continuous integration, Debian, DevOps, domain-specific language, don't repeat yourself, general-purpose programming language, Infrastructure as a Service, job automation, pull request, side project, smart transportation, web application

Deployment The process of bringing software up onto a live system. DevOps IT buzzword that gained popularity in the mid-2010s. Dry run See Check mode. DSL Domain-specific language. In systems that use DSLs, the user interacts with the systems by writing text files in the domain-specific language and then runs those files through the system. DSLs are not as powerful as general-purpose programming language, but (if designed well) they are easier to read and write than general-purpose programming language. Ansible exposes a DSL that uses YAML syntax. Dynamic inventory Source that provides Ansible with information about hosts and groups at playbook execution time. EBS Elastic block store. On Amazon EC2, an EBS refers to a persistent disk that can be attached to instances. Fact A variable that contains information about a specific host.

Scala in Action by Nilanjan Raychaudhuri

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

continuous integration, create, read, update, delete, database schema, domain-specific language, don't repeat yourself, en.wikipedia.org, failed state, fault tolerance, general-purpose programming language, index card, MVC pattern, type inference, web application

Chapter 5, the end of part 1, focuses on functional programming, although you’ve been doing functional programming if you’ve been following the examples in the book. In some cases functional programming is obvious; other times it is mixed with object-oriented constructs of Scala. The chapter also touches on monads and practical examples. Chapter 1. Why Scala? This chapter covers What Scala is High-level features of the Scala language Why you should pick Scala as your next language Scala is a general-purpose programming language that runs on Java Virtual Machine (JVM) and .NET platforms. But the recent explosion of programming languages on JVM, .NET, and other platforms raises a question that every developer faces today: which programming language to learn next? Which languages are ready for mainstream development? Among the heap of programming languages like Groovy, Ruby, Clojure, Erlang, and F#, why should you learn Scala?

This makes Scala powerful because it gives you more in your toolbox to solve programming problems. If you have existing Java applications and are looking for a language that will improve your productivity and at the same time reuse your existing Java codebase, you’ll like Scala’s Java integration and the fact that Scala runs on the JVM platform. Now let’s explore Scala a bit more. 1.1. What’s Scala? Scala is a general-purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional programming languages, enabling programmers to be more productive. Martin Odersky (the creator of Scala) and his team started development on Scala in 2001 in the programming methods laboratory at EPFL (École Polytechnique Fédérale de Lausanne).

Quantitative Trading: How to Build Your Own Algorithmic Trading Business by Ernie Chan

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

algorithmic trading, asset allocation, automated trading system, backtesting, Black Swan, Brownian motion, business continuity plan, compound rate of return, Edward Thorp, Elliott wave, endowment effect, fixed income, general-purpose programming language, index fund, John Markoff, Long Term Capital Management, loss aversion, p-value, paper trading, price discovery process, quantitative hedge fund, quantitative trading / quantitative finance, random walk, Ray Kurzweil, Renaissance Technologies, risk-adjusted returns, Sharpe ratio, short selling, statistical arbitrage, statistical model, survivorship bias, systematic trading, transaction costs

There are some brokerages such as TradeStation that offer a complete backtesting and order submission platform. If you backtested on such a platform, then it is trivial to configure it so that the program will submit real orders to your account. This dispenses with the need to write your own software, whether for backtesting or for automated execution. However, as I mentioned in Chapter 3, the drawback of such proprietary systems is that they are seldom as flexible as a general-purpose programming language like MATLAB or Java for the construction of your strategy. For instance, if you want to pursue a rather mathematically complex strategy based on principal component analysis (such as the one in Example 7.4), it would be quite difficult to backtest in TradeStation. More advanced integrated trading platforms such as Alphacet’s Discovery do P1: JYS c05 JWBK321-Chan 86 September 24, 2008 13:55 Printer: Yet to come QUANTITATIVE TRADING provide a much larger variety of algorithms to be backtested and implemented, but they may not be affordable to the typical independent trader.


pages: 292 words: 62,575

97 Things Every Programmer Should Know by Kevlin Henney

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

A Pattern Language, active measures, business intelligence, commoditize, continuous integration, crowdsourcing, database schema, deliberate practice, domain-specific language, don't repeat yourself, Donald Knuth, fixed income, general-purpose programming language, Grace Hopper, index card, inventory management, job satisfaction, loose coupling, Silicon Valley, sorting algorithm, The Wisdom of Crowds

In the world of software, DSLs are about executable expressions in a language specific to a domain, employing a limited vocabulary and grammar that is readable, understandable, and—hopefully—writable by domain experts. DSLs targeted at software developers or scientists have been around for a long time. The Unix "little languages" found in configuration files and the languages created with the power of LISP macros are some of the older examples. DSLs are commonly classified as either internal or external: Internal DSLs Are written in a general-purpose programming language whose syntax has been bent to look much more like natural language. This is easier for languages that offer more syntactic sugar and formatting possibilities (e.g., Ruby and Scala) than it is for others that do not (e.g., Java). Most internal DSLs wrap existing APIs, libraries, or business code and provide a wrapper for less mind-bending access to the functionality. They are directly executable by just running them.


pages: 536 words: 73,482

Programming Clojure by Stuart Halloway, Aaron Bedra

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

continuous integration, en.wikipedia.org, general-purpose programming language, Gödel, Escher, Bach, Paul Graham, Ruby on Rails, type inference, web application

Clojure is written to take advantage of the optimizations possible on modern JVMs. Many other languages cover some of the features described in the previous list. Of all these languages, Clojure stands out. The individual features listed earlier are powerful and interesting. Their clean synergy in Clojure is compelling. We will cover all these features and more in Chapter 1, ​Getting Started​. Who This Book Is For Clojure is a powerful, general-purpose programming language. As such, this book is for experienced programmers looking for power and elegance. This book will be useful for anyone with experience in a modern programming language such as C#, Java, Python, or Ruby. Clojure is built on top of the Java Virtual Machine, and it is fast. This book will be of particular interest to Java programmers who want the expressiveness of a dynamic language without compromising on performance.


pages: 224 words: 48,804

The Productive Programmer by Neal Ford

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

anti-pattern, business process, c2.com, continuous integration, database schema, domain-specific language, don't repeat yourself, Firefox, general-purpose programming language, knowledge worker, Larry Wall, Ruby on Rails, side project, type inference, web application, William of Occam

Note that this isn’t necessarily a dynamic language or even a Ruby tirade: a strong potential exists for statically typed type-inference languages that have a suitable syntax to also take advantage of this style of programming. For an example of this, check out Jaskell* and, in particular, the build DSL written on top of it called Neptune.† Neptune performs the same basic tasks as Ant, but it is written as a domain-specific language atop Jaskell. It shows how readable and concise you can make code in Jaskell, using a familiar problem domain. NOTE Dietzler’s Law: even general-purpose programming languages suffer from the “80-10-10” rule. The Law of Demeter The Law of Demeter was developed at Northwestern University in the late ’80s. It is best summarized by the phrase, “Only talk to your closest friends.” The idea is that any given object shouldn’t know anything about the internal details of the objects with which it interacts. The name of the law comes from the Roman goddess Demeter, the goddess of agriculture (and therefore of food distribution).


pages: 238 words: 93,680

The C Programming Language by Brian W. Kernighan, Dennis M. Ritchie

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

general-purpose programming language, sorting algorithm

Dave Prosser answered many detailed questions about the ANSI standard. We used Bjarne Stroustrup's C++ translator extensively for local testing of our programs, and Dave Kristol provided us with an ANSI C compiler for final testing. Rich Drechsler helped greatly with typesetting. Our sincere thanks to all. Brian W. Kernighan Dennis M. Ritchie 8 Preface to the first edition C is a general-purpose programming language with features economy of expression, modern flow control and data structures, and a rich set of operators. C is not a ``very high level'' language, nor a ``big'' one, and is not specialized to any particular area of application. But its absence of restrictions and its generality make it more convenient and effective for many tasks than supposedly more powerful languages. C was originally designed for and implemented on the UNIX operating system on the DEC PDP-11, by Dennis Ritchie.


pages: 471 words: 94,519

Managing Projects With GNU Make by Robert Mecklenburg, Andrew Oram

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

bioinformatics, general-purpose programming language, Larry Wall, Richard Stallman

Then in a makefile we could write: # Set the target for creating the jar and add prerequisites jar_file = parser.jar $(jar_file): $(class_files) If we were to inadvertently add a command script to this makefile text, make would produce the overriding warning. Part III. Appendixes The final section of this book contains information that is not central to the goals ofthe book, but you might find it useful for unusual situations. Appendix A lists the options that the GNU make command accepts on the command line. Appendix B, which you will find amusing and possibly useful, stretches make to act as a general-purpose programming language with data structures and arithmetic operations. Appendix C contains the free license for the book. Appendix A, Running make Makefile Appendix B, The Outer Limits Appendix C, GNU Free Documentation License—GNU Project—Free Software Foundation (FSF) Appendix A. Running make GNU make has an impressive set of command-line options. Most command-line options include a short form and a long form.


pages: 304 words: 125,363

Successful Lisp - About by Unknown

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

AI winter, general-purpose programming language, Paul Graham, Richard Stallman

The emergence of compilers for stock hardware As work began in earnest on the Common Lisp standard, vendors -- most of whom had employees on the standardization committee -- were quick to implement the recommendations under discussion. One of the biggest benefits was the definition of the interface to and behavior of the Lisp compiler; this, together with advances in compiler and garbage collector technology, was a first step toward making Lisp competitive in the arena of general-purpose programming languages. The long road to standardization The committee produced the first public edition of the Common LISP specification in 1984. In a shining example of computer mediated cooperative work, hundreds of LISP users and implementers exchanged thousands of email messages to propose, debate, and vote upon each feature of the new language. Each topic and issue was carefully categorized, indexed, and cross-referenced.


pages: 713 words: 93,944

Seven Databases in Seven Weeks: A Guide to Modern Databases and the NoSQL Movement by Eric Redmond, Jim Wilson, Jim R. Wilson

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Amazon Web Services, create, read, update, delete, data is the new oil, database schema, Debian, domain-specific language, en.wikipedia.org, fault tolerance, full text search, general-purpose programming language, linked data, MVC pattern, natural language processing, node package manager, random walk, recommendation engine, Ruby on Rails, Skype, social graph, web application

Finally, we will investigate the server architecture of Riak and how it uses a novel server layout to provide flexibility in consistency or availability, even in the face of network partitions. Population Script We’ll need a bit more data in this section. To achieve that, we’ll switch to an example using a different kind of hotel, one for people and not pets. A quick populator script in Ruby will create data for a gigantic 10,000-room hotel. If you are not familiar with Ruby, it is a popular general-purpose programming language. It’s quite useful for writing quick scripts in a straightforward and readable manner. You can learn more about Ruby in Programming Ruby: The Pragmatic Programmer’s Guide [TH01] by Dave Thomas and Andy Hunt, as well as online.[12] You’ll also need Ruby’s package manager called RubyGems.[13] With Ruby and RubyGems installed, next install the Riak driver.[14] You may also require the json driver and can run both to make sure


pages: 394 words: 108,215

What the Dormouse Said: How the Sixties Counterculture Shaped the Personal Computer Industry by John Markoff

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Any sufficiently advanced technology is indistinguishable from magic, Apple II, back-to-the-land, beat the dealer, Bill Duvall, Bill Gates: Altair 8800, Buckminster Fuller, California gold rush, card file, computer age, computer vision, conceptual framework, cuban missile crisis, Donald Knuth, Douglas Engelbart, Douglas Engelbart, Dynabook, Edward Thorp, El Camino Real, Electric Kool-Aid Acid Test, general-purpose programming language, Golden Gate Park, Hacker Ethic, hypertext link, informal economy, information retrieval, invention of the printing press, Jeff Rulifson, John Markoff, John Nash: game theory, John von Neumann, Kevin Kelly, knowledge worker, Mahatma Gandhi, Menlo Park, Mother of all demos, Norbert Wiener, packet switching, Paul Terrell, popular electronics, QWERTY keyboard, RAND corporation, RFC: Request For Comment, Richard Stallman, Robert X Cringely, Sand Hill Road, Silicon Valley, Silicon Valley startup, South of Market, San Francisco, speech recognition, Steve Crocker, Steve Jobs, Steve Wozniak, Steven Levy, Stewart Brand, Ted Nelson, Thorstein Veblen, Turing test, union organizing, Vannevar Bush, Whole Earth Catalog, William Shockley: the traitorous eight

He wrote a language called PUB—the cover of the manual for the program was embellished with an engraving of an old British pub—that was a great success. In many respects, it foreshadowed HTML—the markup language that would come to define the World Wide Web and make Internet publishing possible—in that it was the first language to use a feature known as “embedded tags.” At the time, the typesetting industry was independently developing similar languages, but they were all specific to a particular machine. Tesler’s was the first general-purpose programming language that would do typesetting for any type of device. While PUB was finding a devoted band of users, Tesler decided he had had enough of AI research. The Whole Earth Catalog was having a growing influence on the nascent counterculture, and thousands of people in their twenties were leaving the cities and striking out to create a back-to-the-land communal existence. Tesler found a small group of like-minded friends, one of whom, Francine Slate, had been an employee of the Whole Earth Catalog, and together they decided to buy farmland.


pages: 347 words: 97,721

Only Humans Need Apply: Winners and Losers in the Age of Smart Machines by Thomas H. Davenport, Julia Kirby

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

AI winter, Andy Kessler, artificial general intelligence, asset allocation, Automated Insights, autonomous vehicles, basic income, Baxter: Rethink Robotics, business intelligence, business process, call centre, carbon-based life, Clayton Christensen, clockwork universe, commoditize, conceptual framework, dark matter, David Brooks, deliberate practice, deskilling, digital map, Douglas Engelbart, Edward Lloyd's coffeehouse, Elon Musk, Erik Brynjolfsson, estate planning, fixed income, follow your passion, Frank Levy and Richard Murnane: The New Division of Labor, Freestyle chess, game design, general-purpose programming language, Google Glasses, Hans Lippershey, haute cuisine, income inequality, index fund, industrial robot, information retrieval, intermodal, Internet of things, inventory management, Isaac Newton, job automation, John Markoff, John Maynard Keynes: Economic Possibilities for our Grandchildren, John Maynard Keynes: technological unemployment, Khan Academy, knowledge worker, labor-force participation, lifelogging, loss aversion, Mark Zuckerberg, Narrative Science, natural language processing, Norbert Wiener, nuclear winter, pattern recognition, performance metric, Peter Thiel, precariat, quantitative trading / quantitative finance, Ray Kurzweil, Richard Feynman, Richard Feynman, risk tolerance, Robert Shiller, Robert Shiller, Rodney Brooks, Second Machine Age, self-driving car, Silicon Valley, six sigma, Skype, speech recognition, spinning jenny, statistical model, Stephen Hawking, Steve Jobs, Steve Wozniak, strong AI, superintelligent machines, supply-chain management, transaction costs, Tyler Cowen: Great Stagnation, Watson beat the top human players on Jeopardy!, Works Progress Administration, Zipcar

In the old days, an “artificial intelligence” programmer needed to know how to program in AI-oriented languages like LISP and Prolog. More recently, programming in business rule engines (IBM’s ILOG and Fair Isaac’s Blaze, for example) was a common approach to automated systems development. While such jobs still exist, they are not the preferred tools in which most software development in the automation space is done. Most development is done in general-purpose programming languages (Java is the most popular of these by far) and in scripting languages that automate the processing of tasks with a script (Python and Ruby are popular scripting languages). These types of programmers should also be familiar with the tools to store and process big data, including the open-source tools Hadoop and Map/Reduce, Storm, Cassandra, Hive, and Mahout. Finally, people who are interested in programming in this context should be interested in and knowledgeable about some aspect of this field’s key movements: artificial intelligence, natural language processing (NLP), machine learning, deep-learning neural networks, statistical analysis and data mining, and so forth.


pages: 450 words: 569

ANSI Common LISP by Paul Graham

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Donald Knuth, general-purpose programming language, Paul Graham, premature optimization, Ralph Waldo Emerson, random walk

Explain what's wrong with each, and give a correct version: (a) (defun summit ( 1 s t ) (remove nil 1st) (apply #' + 1st)) (b) (defun summit (1st) (let ((x (car 1st))) (if (null x) (summit (cdr 1st)) (+ x (summit (cdr 1st)))))) 3 Lists Lists are one of the fundamental data structures in Lisp. In the earliest dialects they were the only data structure: the name "Lisp" originally stood for "LISt Processor." But Lisp has long since outgrown this acronym. Common Lisp is a general-purpose programming language with a wide variety of data structures. The development of Lisp programs often echoes the development of Lisp itself. In the initial version of a Lisp program, you may use a lot of lists. Then in later versions you may switch to faster, specialized data structures. This chapter describes the many things you can do with lists, and uses them to illustrate some general Lisp concepts. 3.1 Conses Section 2.4 introduced cons, car, and cdr, the primitive list-manipulation functions.


pages: 398 words: 31,161

Gnuplot in Action: Understanding Data With Graphs by Philipp Janert

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

bioinformatics, business intelligence, centre right, Debian, general-purpose programming language, iterative process, mandelbrot fractal, pattern recognition, random walk, Richard Stallman, six sigma, survivorship bias

Limited functionality exists to customize how users interact with generated interactive graphics. We can bind commands to specific keys and capture certain kinds of mouse input. Gnuplot can be used to serve up dynamically generated images from a web server. If we don’t need to process individual, dynamic user input, it’s sufficient to use an appropriate gnuplot batch file as server-side script. Using a wrapper in a general-purpose programming language, which employs gnuplot as graphing engine, gives us much greater flexibility. Now that we know how to use gnuplot, I want to spend some time discussing what can be done with it. This is what the next (and last) part of this book is about: applications of graphical analysis. Stay tuned. Part 4 Graphical Analysis with Gnuplot W e can now take gnuplot for granted and discuss how it can be used to solve problems using graphical methods.


pages: 404 words: 43,442

The Art of R Programming by Norman Matloff

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Debian, discrete time, Donald Knuth, general-purpose programming language, linked data, sorting algorithm, statistical model

R has a number of virtues: • It is a public-domain implementation of the widely regarded S statistical language, and the R/S platform is a de facto standard among professional statisticians. • It is comparable, and often superior, in power to commercial products in most of the significant senses—variety of operations available, programmability, graphics, and so on. • It is available for the Windows, Mac, and Linux operating systems. • In addition to providing statistical operations, R is a general-purpose programming language, so you can use it to automate analyses and create new functions that extend the existing language features. • It incorporates features found in object-oriented and functional programming languages. • The system saves data sets between sessions, so you don’t need to reload them each time. It saves your command history too. • Because R is open source software, it’s easy to get help from the user community.


pages: 372 words: 152

The End of Work by Jeremy Rifkin

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

banking crisis, Bertrand Russell: In Praise of Idleness, blue-collar work, cashless society, collective bargaining, computer age, deskilling, Dissolution of the Soviet Union, employer provided health coverage, Erik Brynjolfsson, full employment, future of work, general-purpose programming language, George Gilder, global village, hiring and firing, informal economy, interchangeable parts, invention of the telegraph, Jacques de Vaucanson, job automation, John Maynard Keynes: technological unemployment, knowledge economy, knowledge worker, land reform, low skilled workers, means of production, new economy, New Urbanism, Paul Samuelson, pink-collar, post-industrial society, Productivity paradox, Richard Florida, Ronald Reagan, Silicon Valley, speech recognition, strikebreaker, technoutopianism, Thorstein Veblen, Toyota Production System, trade route, trickle-down economics, women in the workforce, working poor, working-age population, Works Progress Administration

The trade journal Machinery and Production Engineering stated the corporate view in blunt terms: "The payment of higher wages to workers who cannot be described by any standards as anything more elevated than machine minders is rapidly becoming unattractive, and where a man is employed solely for unloading one machine and loading another ... the substitution of a robot is not only a glaringly obvious course but also increasingly easy to justify financially. Moreover a robot is not subject to the random variations in performance ... and is for all practical purposes working as hard, as conscientiously, and as consistentlyat the end of the shift as it is at the beginning."13 Industrial engineers are currently developing even more advanced machine surrogates "with such capabilities as voice communication, a general purpose programming language, learning from experience, three-dimensional vision with color sensitivity, multiple hand to hand coordination, walking and self-navigating skills, and selfdiagnostic and correction skills." The goal, says sociologist Michael Wallace, "is to approach, as closely as possible, the human capabilities to process environmental data and to solve problems, while avoiding the problems (e.g. absenteeism and turnover) presented by human agents."14 It is estimated that each robot replaces four jobs in the economy, and if in constant use twenty-four hours a day, will pay for itself in just over one year.


pages: 1,065 words: 229,099

Real World Haskell by Bryan O'Sullivan, John Goerzen, Donald Stewart, Donald Bruce Stewart

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

bash_history, database schema, Debian, digital map, distributed revision control, domain-specific language, en.wikipedia.org, Firefox, general-purpose programming language, Guido van Rossum, job automation, Larry Wall, p-value, Plutocrats, plutocrats, revision control, sorting algorithm, transfer pricing, type inference, web application, Y Combinator

If you start out anticipating an occasional surprise or difficulty along with the fun stuff, you will have the best experience. Any rough patches you might hit won’t last long. As you become a more seasoned Haskell programmer, the way that you write code will change. Indeed, over the course of this book, the way that we present code will evolve, as we move from the basics of the language to increasingly powerful and productive features and techniques. What to Expect from Haskell Haskell is a general-purpose programming language. It was designed without any application niche in mind. Although it takes a strong stand on how programs should be written, it does not favor one problem domain over others. While at its core, the language encourages a pure, lazy style of functional programming, this is the default, not the only option. Haskell also supports the more traditional models of procedural code and strict evaluation.


pages: 999 words: 194,942

Clojure Programming by Chas Emerick, Brian Carper, Christophe Grand

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Amazon Web Services, Benoit Mandelbrot, cloud computing, continuous integration, database schema, domain-specific language, don't repeat yourself, en.wikipedia.org, failed state, finite state, Firefox, game design, general-purpose programming language, Guido van Rossum, Larry Wall, mandelbrot fractal, Paul Graham, platform as a service, premature optimization, random walk, Ruby on Rails, Schrödinger's Cat, semantic web, software as a service, sorting algorithm, Turing complete, type inference, web application

Symbols that contain a slash (/) denote a namespaced symbol and will evaluate to the named value in the specified namespace. The evaluation of symbols to the entity they name depends upon their context and the namespaces available within that context. We talk about the semantics of namespaces and symbol evaluation extensively in Namespaces. Numbers Clojure provides a plethora of numeric literals (see Table 1-2). Many of them are pedestrian, but others are rare to find in a general-purpose programming language and can simplify the implementation of certain algorithms—especially in cases where the algorithms are defined in terms of particular numeric representations (octal, binary, rational numbers, and scientific notation). Warning While the Java runtime defines a particular range of numeric primitives, and Clojure supports interoperability with those primitives, Clojure has a bias toward longs and doubles at the expense of other widths, including bytes, shorts, ints, and floats.


Martin Kleppmann-Designing Data-Intensive Applications. The Big Ideas Behind Reliable, Scalable and Maintainable Systems-O’Reilly (2017) by Unknown

active measures, Amazon Web Services, bitcoin, blockchain, business intelligence, business process, c2.com, cloud computing, collaborative editing, commoditize, conceptual framework, cryptocurrency, database schema, DevOps, distributed ledger, Donald Knuth, Edward Snowden, ethereum blockchain, fault tolerance, finite state, Flash crash, full text search, general-purpose programming language, informal economy, information retrieval, Internet of things, iterative process, John von Neumann, loose coupling, Marc Andreessen, natural language processing, Network effects, packet switching, peer-to-peer, performance metric, place-making, premature optimization, recommendation engine, Richard Feynman, Richard Feynman, self-driving car, semantic web, Shoshana Zuboff, social graph, social web, software as a service, software is eating the world, sorting algorithm, source of truth, SPARQL, speech recognition, statistical model, web application, WebSocket, wikimedia commons

The difference between an interactive transaction and a stored procedure (using the example transaction of Figure 7-8). 254 | Chapter 7: Transactions Pros and cons of stored procedures Stored procedures have existed for some time in relational databases, and they have been part of the SQL standard (SQL/PSM) since 1999. They have gained a somewhat bad reputation, for various reasons: • Each database vendor has its own language for stored procedures (Oracle has PL/ SQL, SQL Server has T-SQL, PostgreSQL has PL/pgSQL, etc.). These languages haven’t kept up with developments in general-purpose programming languages, so they look quite ugly and archaic from today’s point of view, and they lack the ecosystem of libraries that you find with most programming languages. • Code running in a database is difficult to manage: compared to an application server, it’s harder to debug, more awkward to keep in version control and deploy, trickier to test, and difficult to integrate with a metrics collection system for monitoring. • A database is often much more performance-sensitive than an application server, because a single database instance is often shared by many application servers.