Yes, they’re real books.
Yes, they’re real books.
Genesis is the first book of the Holy Bible. It is found in every translation of the Old Testament; it is canon in Christianity as well as Judaism. Setting aside external counter arguments (science), let us examine the Scripture itself. Citations are from NIV unless otherwise indicated. The NIV is not God’s literal word, but it is one of the better English translations available. In any case, the structure of Genesis is the same across translations; it would even be scholastically acceptable to use the KJV here.
In Genesis 1, God creates the world:
In Genesis 2, God affirms his creation:
Thus the heavens and the earth were completed in all their vast array.
By the seventh day God had finished the work he had been doing; so on the seventh day he rested from all his work. Then God blessed the seventh day and made it holy, because on it he rested from all the work of creating that he had done.
After resting for a day, God groggily amends creation:
Now no shrub had yet appeared on the earth and no plant had yet sprung up, for the LORD God had not sent rain on the earth and there was no one to work the ground, but streams came up from the earth and watered the whole surface of the ground. Then the LORD God formed a man from the dust of the ground and breathed into his nostrils the breath of life, and the man became a living being.
Was man created before shrubberies or after?
Update: Biblical scholars have arrived at the JPED hypothesis, that the Torah is a compilation of earlier works, known as J, E, P, and D. Much of the earlier material was redacted and transformed before it became the Torah. Thus contradictions were introduced, because different authors supplied different stories.
Magnus offers a refreshingly unique translation of Heraclitus with a variety of strategies for readers to engage the text. Most noticeably, Magnus deliberately articulates his commentary in short, stunted sentences, mimicking the extant Heraclitean quotes. Magnus is extremely playful, weaving philosophical and poetic thought in analytic and conversational rhetoric.
However, the core of Magnus’ commentary is word association, an analytical method more typical of child’s play. Magnus is a passionate lover of Heraclitus, but to some, Heraclitean Pride may read as a mockery of the original sayings. The stop-and-go form was, after all, a by-product of the burning, ripping, and simple loss of Heraclitus’ writings. In playing with text, Magnus invites many outsiders to philosophy, but risks losing fellow Heraclitus lovers, including classic logicians and historians. Heraclitus didn’t write. In. Stilted Greek. Heraclitus wrote in normal, flowing sentences, and what little has survived of his writings should not be toyed with as we see fit. The publisher, Furniture Press Books, may or may not have made a Freudian slip in the book cover of Heraclitean Pride, which reads in the lower-right corner, Magnus Pride.
Unfortunately, they’re not cool enough to give away “Ring of Thieves” as an unprotected PDF. For the layman, that means PDF software will refuse to copy portions of the document. Modifying metadata isn’t allowed either.
Why is this a problem? Because I like to sort books by last name first on my Kindle. When I put the freely available “Ring of Thieves” on my Kindle, it fails to sort under Ross, John, or even S. As far as Kindle is concerned, the file has no author. Ordinarily, a little tweak by Calibre would fix this problem.
But, the PDF is protected, so no metadata can be edited. I can’t even save to a new PDF and fix that one. I have a couple options:
Update: Someone has posted a Perl crypt script. Very hard to find, that. It does work, but I’m still having trouble editing metadata. Stupid Kindle refuses to sort by PDF author information.
A Google Books rendition of Charles Caleb Colton’s “Lacon”:
TEne&E are three difficulties in authorship; to write any thing worth the puhlishing-^to find lionest men to publish it?and to get sensible men to r6adit. Literature has now beconie a game
Apologies to Google and Colton: I doubt I could do any better scraping PDFs for text. ePUBs are better because HTML is better:
Functional programming is blessed to have several hardy languages. I have only tried two: Haskell and Common Lisp. From the few tutorials I’ve completed, it seems that Haskell is easy to learn, and Lisp hard to learn.
This difference is, I believe, due to Lisp’s various and sundry dialects, implementations, and macros. In Haskell, there are two major ways to specify local variables: let and where. Common Lisp has at least four: let, let*, flet, and labels. CL has a retarded number of loop constructs. I’m currently reading a sample chapter from Land of Lisp. Here is a code snippet:
(defun find-islands (nodes edge-list) (let ((islands nil)) (labels ((find-island (nodes) (let* ((connected (get-connected (car nodes) edge-list)) (unconnected (set-difference nodes connected))) (push connected islands) (when unconnected (find-island unconnected))))) (find-island nodes)) islands))
The defun syntax is intuitive; it’s like any other language’s function creator. And let makes sense: create some local variables and use them in sub-expressions. But labels baffles me. Would let have sufficed? Why or why not? After googling for a while (there is NO useable, complete Common Lisp reference document, and that includes HyperSpec and the Simplified Common Lisp Reference), I stumbled on a half-readable description of labels.
LABELS is special form for local function binding.
I could have told you that.
Bindings can be recursive and can refer to each other.
So labels is just like defun, defvar, and friends?
Each binding contains function name, arguments, and function body.
It seems that labels is just a special way to do defun locally. If Lisp is so powerful, why doesn’t Barkski do this:
(defun find-islands (nodes edge-list) (let ((islands nil)) (defun find-island (nodes) (let* ((connected (get-connected (car nodes) edge-list)) (unconnected (set-difference nodes connected))) (push connected islands) (when unconnected (find-island unconnected)))) (find-island nodes) islands))
Nested functions don’t require special syntax in Haskell, Python, or Lua. Why should they in the premier functional language? I think the answer is that CL allows nested defuns, but lispers aren’t happy with that–they want a closure they can use in if, cond, and other non-code-block areas. A combination of let and lambda would do just that, but macro-addiction dictates that a new syntax be created. Now we have labels.
So that’s defun, let, and labels. Then there’s let*. Apparently let* is similiar to flet, which is similiar to labels , which is similar to let, except that I’ve forgotten where the fuck I was going with that. These macros are simply variations of let, some more powerful than others.
Land of Lisp does explain these macros, but if they weren’t used in the code, they wouldn’t have to be explained. Or, Barski could have used a separate example for each macro, but that would have taken more pages. There must be a balance between code simplicity and time to get the game running. I understand his dilemma. But if he errs to often on the side of code obscurity, then readers will simply close the book. I don’t know if I can write an informative and entertaining programming tutorial as well as Barski does, but I know what I like in one, and it’s not a never-ending stream of new syntax. I’m still going to buy the book, and I’m still going to love it. It’s just going to take longer for me to parse than I had expected.
As I follow the exercises in Practical Common Lisp (PCL) by Peter Seibel, I’ll post the experiences here. Let’s get started.
is available in dead-tree format and as a series of HTML files. My new Nook is hungry for ePubs, so I downloaded each PCL chapter, dragged and dropped into Sigil, and tweaked the resulting ePub. Sigil has a horrible bug which shoves code blocks way down pages, so my copy of PCL isn’t looking too great. But I plan to write a CL program to restore its former glory.
is an introduction designed to welcome programmers to Lisp. A short summary would be: DON’T PANIC. The intro is humorous and intriguing.
Shit just got real. Now PCL ushers the reader to install Lisp in a box (really Lispbox). Back in 2005, Lispbox was surely a godsend for the budding Common Lisper, but in 2010 it’s not only aged, it’s broken. I’ve already blogged about the pain and agony of setting up a CL system, and I won’t repeat myself. Suffice to say MacPorts is only half a saving grace for Mac users. I’m currently using Aquamacs and Aquamacs SLIME with MacPorts CLISP and Quicklisp besides. My .emacs is pastebinned.
PCL covers the basics of Emacs shortcut keys then jumps to the Lisp interpreter. SLIME is quite helpful in this endeavor, compiling, running, debugging my code for me. I like the PCL’s Hello World is not a program but an expression entered into the REPL. Since half the work will be done there, it’s a good idea to get acquainted with ol’ Reppy.
PCL dives into writing defun’s; introduces the debugger; details the proper loading of source files and optional compilation of same, and ends with a NASA anecdote. A geek such as I couldn’t hope for much more than this chapter.
The first practical chapter. PCL invites the reader to construct a simple music database, introducing Lisp syntacs and semantics along the way. I completed save-db, load-db, … up to update and delete-rows. I’m happy to report that Seibel’s code is clear and concise. PCL suggests using a combination of select and where to simulate a SQL query, with the effect that I almost believe I’m using a real database.
The section, “Removing Duplication and Winning Big” is not easy to skim over, so I’m stuck there for now. It covers Lisp macros, a topic I’ve only heard in reverent whispers.
I’ll let you in on a secret: I’m concurrently reading Real World Haskell. There are notable differences between Haskell and Common Lisp.
Haskell has one official version (GHC) available on multiple platforms, free, and open source. Common Lisp has no official version. There are Windows-only versions, commercial versions, Linux-only versions with broken makefiles, and CL install kits that once served a purpose but now only serve to mock the senseless diversity of CL implementations.
Installing a complete Haskell environment is simple and painless. Installing Common Lisp took me on a journey.
GHC incorporates new features in each version. Common Lisp’s lack of an official version means that each flavor includes and omits important features. E.g., some come with multithreading, some don’t. ANSI can’t be as responsive as the Haskell community, so the Common Lisp standard will likely not benefit from new features anytime soon.
Haskell stores functions and variables in the same space. Common Lisp does not; it requires ' and #' to pass functions around.
Haskell syntax is light and uniform. By PCL Ch. 3, Common Lisp syntax is starting to slow me down.
Haskell has monads. Common Lisp has macros. More on that when I learn precisely what they are and how to use them.
Haskell’s error messages are somewhat esoteric. Common Lisp’s are more readable.
GHCi’s REPL has enough features to satisfy most programmers. Common Lisp REPLs often fail to include expression history, backspace functionality, and other obvious REPL features. CL REPLs are so crippled that Emacs/SLIME is a necessity.
Both Haskell and Common Lisp syntax are unique, requiring special effort to understand. I believe this is because BASIC syntax is more natural. STEP 1 STEP 2 STEP 3 is intuitive for humans. On the other hand, linear procedures aren’t very powerful. Functional languages have power because they break out of the STEP 1 STEP 2 STEP 3 routine: Spaghetti code is the result of a procedural programmer attempting to do more complex work.
I’m not sure exactly when I need to #' functions in Common Lisp. While following the PCL exercises, I’ve left out #' for lambdas, and my code gives the same results as Seibel’s. It stands to reason that lambdas don’t need to be #'ed since they self-evaluate. Allegro and CLISP don’t need #' for lambdas, but I’m not sure about other CLs. In any case, I’d like to see a note about this in PCL. Also, I wonder why multiple quote syntaxes exist: ', `, and quote.
Look at the code for generating a database query. There are SIX different symbols, each with their own purpose and usage.
(defmacro where (&rest clauses) `#'(lambda (cd) (and ,@(make-comparison-expr-list clauses))))
The ampersand in &rest is CL’s way of handling function arguments. &key would interpret the arguments as a property list, while &rest stores all the arguments in clauses.
The #' references the lambda without evaluating it. That is, pound (#) references an unevaluated (') lambda object.
The comma (,) and at (@) work together to force evaluation inside the unevaluated (`#') lambda expression. The lambda would have been prefaced with '#', but ,@ only works inside the backtick quote (`).
The interface needs some work, but the website is a good idea. List the books you’ve read. You can then look at virtual shelves, rate books, review books, and connect with people who have read similar books.
Check out the books I’m reading.
P.S. LibraryThing has a limit of 200 books unless you purchase a membership (lifetime is only $25).