1. 7

    Call me an optimist, but I’m hopeful that this can do to progressive C++ shops what Clojure did to progressive Java shops. Lots of opportunities for a Lisp to be useful there, and C++ programmers won’t be philosophically opposed to using a huge/complex language.

    1. 4

      Cleaning up some work code to parse written-out numbers (“one hundred and twenty-three”), then heading off to Strange Loop for the rest of the week.

      1. 3

        I’m working on a few things.

        $WORK is over for me. $SCHOOL is starting, so I’m figuring out my final schedule with labs and office hours and other things. No coursework besides reading yet.

        I shipped Clojure code, though I’m sure it’s bad. I ported a Python and Scala library I’d seen before to Clojure. It’s my first shot at writing even really trivial Clojure code, so any code reviews or feedback would be really appreciated.

        https://github.com/tropicalmug/teaser-clj

        1. 5

          Congratulations on shipping!

          Since you asked for it, a few thoughts on the code:

          • Silently suppressing all the IllegalArgumentExceptions is not a good thing. The best would be to reshuffle things so you never got them in the first place, but if nothing else you should surface something from the function.

          • I’d break it up into several namespaces/files. You de facto did this with some of your comments (e.g. ; Stopwords)—I’d go all the way.

          • Speaking of comments, I’d follow these guidelines on how many semicolons to use.

          • Try to avoid declare as much as possible.

          • Some of your function naming could be rethought (e.g. filter-stopwords-wordmap).

          • The dbs function is scary. Think long and hard before using atoms.

          • Make a file called config.edn that looks like this, and then use clojure.edn to load it:

          {:stopwords #{"-"
                        " "
                        ...}}
          

          I’m always wary of code review since it makes me look like an irritable grouch…again, congratulations on shipping and on an excellent start to Clojure!

          1. 3

            No need to feel like a grouch, I wanted feedback! It’s all true and actionable, good traits of a good review. Thank you for helping out.

        1. 3

          Work: Learning Ember.js, and looking lustfully at all the NLP-in-Clojure stories we have deep in the backlog.

          Side work: Spinning up a prototype iPhone app that uses Bluetooth 4.0 to find things in your house.

          Not-work: Learning Ember.js for a new app for music practicing. And practicing fiercely on period instruments for the 2014 National Scottish Fiddling Championship, which is on Saturday.

          1. 7

            Work:

            Refactoring our Clojure codebase to use…something sane. Currently still researching, but Prismatic Graph looks like the best fit so far.

            Not work:

            Swearing violently at CSS for my personal site (featuring tsm-the-musician, not tsm-the-programmer). I’m growing increasingly unsatisfied with the Octopress theme I have, so I should probably just nuke it and find a new one.

            1. 4

              I think we’d all benefit from a lot more people having an opportunity to give Genera a try. So many things about it are just so different, fascinating, and work well together. Even what we think of as a command line interface today could be so much more than it is.

              1. 2

                Is it possible to try it (or something similar)? If I got it right from the wikipedia article, this is a commercial product.

                1. 2

                  It was, but Symbolics went out of business. These machines are nearly impossible to find anymore. There are rumours of being able to run the VLM on Linux.

                  1. 1

                    OpenGenera is probably your best bet.

                    1. 1

                      Nice! I’d been struggling to follow some old links to get OpenGenera running and wasn’t getting anywhere.

                1. 14

                  As a former Lisp user of five years, I profoundly disagree with the article’s thesis. That thesis is an attempt to explain the reason Lisp has not replicated its successes from before the “AI Winter” of the 1980s and 90s; specifically, the author takes the position that Lisp is so expressive that nobody can read code written in it.

                  This is a fairly extreme position to take against any programming language, so I hope my strongly-worded response won’t be viewed too harshly!

                  Briefly, I believe Lisp’s lack of 21st-century success has been due in large part to the existence of other functional languages out there, some of which even - as we know :) - have rich static type systems, and in that respect are actually superior to Lisp (gasp!). Recall that Lisp has existed in something resembling its current form since the 1960s, and at one time, it was the only game in town for functional programming - yes, Forth technically had higher-order functions, but it was very different in other ways and few people used it for general-purpose programming tasks! It’s unreasonable to expect it to fare as well in today’s landscape, which has far more competition from other excellent languages. I myself left Common Lisp for Haskell, for example. :)

                  Second, I would like to point out that many of the classic Lisp AI successes… let me get concrete. SHRDLU is my archetypical example. It was a wonderful piece of what today we would call natural-language processing, inventing multiple novel techniques… The PhD thesis describing it is titled Procedures as a representation for knowledge in computer programs for understanding natural language, which gives you some idea of the depth!

                  It provided a self-contained simulated world (modeling, in three dimensions, a robotic arm and some child’s toy blocks), which could be manipulated by directing the simulated robot in English! The robot understands complicated grammar for both commands and inquiries, which can be not only about the current state of the world, but also about its reasons for having taken particular actions. Google for some transcripts if you haven’t seen them.

                  NLP has moved on and can do similar things on behalf of private parties such as Google who, to my knowledge, have not really published their techniques… But there is no such simple end-to-end demonstration and testbed extant today.

                  So. I would like to point out that SHRDLU, then, not only no longer runs*, but its author (Terry Winograd) is no longer interested in the problem. And who can blame him? After seeing a seminal work like this ignored for decades, I would probably lose interest in ramming it down the world’s throat, too! The AI winter cut deeper and lasted longer than the more-recent 2000 tech crash, and the talent that was lost to it is in many cases simply no longer alive or not planning to return to the field. All the modern work in the fields which used to all be regarded as simply part of the single field of artificial intelligence… is essentially reinvention.

                  What does that have to do with the virtues of Lisp? Well, it was the preferred tool of the people who have moved on. There is no reason to expect that an entirely new generation of programmers not drawing on the techniques or codebases of the past will have any use for their forerunners' tools. The success of Lisp was the success of the programs that were written in it, and nobody is writing new artificial-intelligence research in Lisp anymore.

                  Okay - as you can probably tell, I have strong feelings about the language. For full disclosure, I hereby acknowledge that I consider Clojure in many respects a step backwards from Common Lisp, and my displeasure with the people currently programming in Lisp has therefore doubtless colored the views expressed above.

                  I would like to note also that what I am not doing here is trying to defend the language against the claim that it was “too expressive” - I am simply providing an alternate explanation as I see it. I don’t really understand how a language can be too expressive, but I suppose it might make sense to address the claim more thoroughly sometime. That would take a long time, though, and would not really be at the heart of the issue.

                  • (Actually, there was an effort circa 2002 to port SHRDLU to a modern dialect and operating system, run by a team of talented undergraduates on behalf of a philosophy professor of all things!, but I don’t believe it was fully successful. Please correct me if you know otherwise.)
                  1. 6

                    I consider Clojure in many respects a step backwards from Common Lisp

                    Would you mind expanding on that? I’m a hobbyist CLer turned professional Clojurian, so I’m keenly interested.

                    To me the biggest thing that’s stood about Clojure is that it’s a functional language. In CL I usually wrote in a functional style, but sometimes it just made more sense to get CLOS involved or to setf a dang variable. CL tooling is also superior, in my experience.

                    But I’m interested in your take on it.

                    1. 4

                      Fascinating discussion. The “lisp is too power argument” appears at predictable intervals but when it scares out beautiful comments of this sort it is worth it.

                      I’m not a lisper at all but I did download the SHRDLU source code when it become available a while back (and I’ve looked at Winograd’s Understanding Natural Language - the published version of his thesis, it seems). As far as I understand it, SHRDLU’s lisp dialect is significantly more “free form” than any modern lisp. You wind-up with a rather tightly-couple self-modifying parser - though one still based on the most sophisticated language concepts of its day.

                      It seems that SHRDLU was the apogee for the logical specification of natural language. If Google has things that are better, they still come from entirely different, more “brute force” approaches.

                      All this suggests the interesting possibility that human language may be logically specified with systems like SHRDLU but such systems need to be so tightly coupled they become unmanageable for humans. I remember a report that Winograd himself had a devil of a time making SHRDLU function, in fact.

                      Winograd went on the write a very sophisticated critique of AI, “Computers And Cognition”,

                      http://www.amazon.com/Understanding-Computers-Cognition-Foundation-Design/dp/0201112973

                      1. 5

                        Posting something doesn’t necessarily mean I endorse it, but I found this particular quote amusing:

                        “Endgame: A random old-time Lisp hacker’s collection of macros will add up to an undocumented, unportable, bug-ridden implementation of 80% of Haskell because Lisp is more powerful than Haskell.”

                        My experience of Common Lisp was that it was a lot of Galapagos Island programmers/mini-languages in their own worlds. Clojure mostly avoided this.

                        Me? I left Clojure for Haskell.

                        1. 2

                          Fair point! It would be fun to look back at Clojure someday and see how the community is different from the CL community that I remember.

                          During the period when I was actively involved, I never saw Lispers do anything even remotely resembling static types. So, I don’t see where the idea of Lispers reimplementing Haskell comes from. Oh well. :)

                          1. 3

                            To be clear, I agree that Clojure was and is a step back from the strengths of Common Lisp, but it solved some social problems unrelated to those strengths.

                            1. 2

                              Okay. :) I imagine that could easily be true.

                      1. 7

                        Putting together a book of my own compositions (short fiddle tunes in the style of eighteenth century Scotland). It’s been very disorienting to be using vim and a compiler (an ASCII format -> postscript) without actually programming, but it’s still enormously satisfying to see the book take form.

                        I should be releasing it on Gumroad in a week or two.

                        1. 2

                          I run an interactive sheet music site called Soundslice (http://www.soundslice.com/), and we let artists sell notation for their tunes. If you’re interested in using us to sell your stuff, let me know!

                          1. 1

                            That’d be awesome! I saw the Soundslice post here a few weeks ago and thought it looked really cool (and impressive programming), but thought it was too guitar-centric. I’m excited to hear you think there’s a place for violinists!

                            My email address is my username plus “acdonald@gmail.com”.

                            (And nice to see a fellow Chicagoan!)

                        1. 3

                          Headdit: A revolutionary way to browse reddit. Control reddit by using gestures with your webcam. Except it’s not quite April Fools, since it actually works.

                          1. 3

                            The conclusion under the “Is It Worth All of the Hype?” heading seems spot-on. However, due to the amount of time the average programmer spends inside their editor, the constant effort to optimize the whole process around editing code does make sense as long as it doesn’t turn into an obsession.

                            1. 12

                              While this response will sound snide and cynical, I try to give myself as little help as possible in writing code. “The horror!” you scream. But no, I want to make it hard to write a lot of code so my solutions are as small and simple as possible. Nice editors make writing a lot of code easy, which is in direct opposition to reading code, the most important aspect of programming.

                              1. 4

                                Oh, I see where you’re coming from, and I do agree with you to a certain extent. But, there are improvements to be made outside of helping one write long and needlessly complicated code – e.g. playing nicely with other tools (LightTable’s leiningen integration), automating processes (integrating build systems), and integrating docs.

                                I’m sure not all of it will be everyone’s cup of tea, but I know some of them definitely help me in day-to-day tasks.

                                1. 3

                                  You can pry vim from my cold dead hands because it’s a good editor. It’s not much for creating code (no autocomplete or snippets or whatever people use these days), but it excels at taking code that’s broken in some form (either buggy or in need of refactoring) and letting me whip it into shape with minimal hassle.