association-list

29 October, 2006

More maundering on about Lisp.

Filed under: geekery, lisp — Evan @ 2:14 pm

One of the thing that makes CL a pain in the ass sometimes is that there are a lot of strangely named functions specialized for different types of objects. The language has a trillion keywords and a lot of them don’t really help the language learner get comfortable with the language. As an example, iteration:

In the language standard there are a couple of different iteration constructs, do, dolist, docount, and loop. Strangely, there is no doarray. It’s easy enough to write one:


(defmacro do-svect ((counter array) &rest body)
  (let ((ctr (gensym)))
    `(dotimes (,ctr (fill-pointer ,array)) 
       (let ((,counter (aref ,array ,ctr)))
     ,@body))))

That’s all well and good, but it’s a pain to have to write a macro for each and every sequence type of thing that you have to deal with, and while I understand why it isn’t there, I don’t understand why there isn’t some general foreach type of function. It would be easy enough to write, just a macro that detects the type of the sequence type the function was called on that writes out the appropriate thing. There are a number of situations where this would help a lot, to the beginner. Just layer them as macros over the normal syntax and keywords, which, of course, would all still be there if you needed to do something more complicated.

Syntax, I think, makes things easier to remember, because (and I’m theorizing here) it calls in some other part of the brain than the part that we use to remember vocabulary, which is what we’re being asked to do with Lisp. I’ve never in my life written a line of Smalltalk, but I can remember that their lambda syntax is something like [ x y | x * y ]. I know very little Erlang, but I know that their binary pattern matching syntax is << x/integer, y/float >> = val. I’ve been reading about lisp for years and staring at it for ten of the last sixteen hours and I’ll be damned if I can remember how to pass multiple values back from a function.

Perhaps Arc will fix all of this, but I think that it would be of no little value to the Lisp community, and to those who want to learn lisp, if people started working on a package that everyone agreed to include and use with their distributions (hah!) that made some things a little easier. It could be something like the modern package that comes with ACL. Hell, everyone could make their own and then we could give them six months, then put them all in a ring and make them fight and then make something more or less agreeable to everyone with the parts that are left over.

Lisp is famed for it’s ability to quickly generate Domain Specific Languages, so perhaps it’s time that we bent that ability towards a different kind of domain, that of learning the language itself. It might also point to the kinds of things that would be interesting to put into the next version of the spec, in the far-off, misty future when that fabled document is actually generated.

28 October, 2006

Yet another bookshelf update.

Filed under: bookshelf, reviews — Evan @ 4:32 pm

Quiet lately. Rather busy at work, plus trips home and being busy with other writing projects.

In other news, a few words on books that I’ve finished recently.

Mistborn, by Brandon Sanderson.

Though Elantris was a promising debut, this novel doesn’t step it up as much as one might wish. Although it’s pretty nice in that it is another stand-alone book, for which I think Mr. Sanderson should be applauded, the writing hasn’t grown quite as much as one might wish, and there is also second degree abuse of the word ‘maladroit’. It also doesn’t properly address my complaints about the exceptionalism inherent in modern fantasy. My big gripe with the book is that, although it has its heart in the right place, with the people and all, it doesn’t really interact with them very much. Even the main character, supposedly drawn from the lowest of the low, seems exceptionally clever and not beaten down as the skaa, the proles of this particular word are called, would seem to be, and they’re more or less disposable and interchangeable throughout the course of the narrative. There is a touch of the revolutionary vanguard party ideology going on here, that’s something that I’ve never been able to identify with, although your mileage may vary, depending on your political stripe and tolerance for that sort of thing. However, Sanderson continues to produce books that stand head and shoulders above standard extruded fantasy product and take on the standard tropes of the genre with no small amount of rigor and inventiveness.

Trial of Flowers by Jay Lake.

I got ahold of a galley of this one, which is coming out soonish. It starts out in the vein of novels like The Etched City (which I loved) and Veniss Underground (which I thought was interesting, but flawed), but lacks the ultimate sense of hopelessness that many of the novels of that ilk are afflicted by, and I think is made better thereby. It’s refreshing to see a blend of the world-weary and disaffected characters most traditional to the ‘new weird’ movement fused with some of the grand, sweeping structural elements of traditional fantasy without being overconsious of the effect, and I think that this is where the great strength of this novel lies. Deeper but more distant than work by Mieville, who I would hold up as the modern exemplar, I think that a lot of people will like this one, and also that it heralds big things for Mr. Lake.

The Demon and The City, by Liz Williams.

I really shouldn’t even have to say anything here. The Chen novels just get more interesting in this iteration, and Williams just gets better and better. All told, I have to admit that I slightly prefer her ‘pure’ science fiction stuff, but these novels are a lot of fun, and I think that they’re much more accessible to a general audience.

Night Watch by Sergei Lukyanenko.

I thought that the film was decent, but I liked the book(s) quite a bit better. The movies changed the story around to create resonances that I don’t think really needed to be created, and I think that the lost a lot without the conflicted voice of the narrator. The ending feels a little like a cheat, but the setting is interesting, and I hope that this one does well enough to get more Russian contemporary fiction and genre stuff coming out in English.

The Child Garden by Geoff Ryman.

Um. Wow. I just finished this and I will admit to being more than a little overwhelmed. Ryman is, in my opinion, one of the top three prose stylists working in the genre at the moment. My inner science geek is appalled, at times, with the treatment of some of the science, but that’s about the only criticism that I can level at this particular work. The world depicted is simultaneously intricately surreal and utterly quotidian, and I would describe it, at the risk of sounding Cluteian, as a fictive world with the heft of the Real. There are some disturbing elements and some absolutely harrowing sequences. The book really sucks you in to the point where it’s painful to read some of it, but you cannot stop. I haven’t read all of Ryman’s novels, but with every one I am more and more impressed.

Sun of Suns by Karl Schroeder.

Two words, people: Air Pirates. This book, which is a smart little novel in the vein of the old pulp adventures updated for contemporary sensibilities, much like Paragaea, by Chris Roberson. It also has one of the cooler science-fictional conceits that I’ve come across recently: The entire novel takes place in a world sized ball of air lit by giant fusion radiators that the people call the suns. The entire thing is convincingly well thought out, but Schroeder never lets the world building get in the way of the action or the driving plot. I quite like Karl Schroeder, and although this is one of his lighter books, I recommend it highly. Fun fun fun, and have the inkling that this particular series is really going to go places.

Blindsight by Peter Watts.

As I’ve said before, this one is a book that you need to read to even pretend that you know where science fiction is in this day and age. There’s likely already enough breathless prose out there describing it, so I won’t add much but to say that it’s a fascinating example of how to make deeply, deeply flawed characters engaging and compelling. Hell, in this one, the characters are barely human (and not, in some cases) but you can’t really put it down. It is not a book without flaws, but it works in the “if you’re not failing you aren’t trying hard enough” kind of sense. Watts might not have reached his goals here, but with the aim of the novel being hitting the ball somewhere into the next state, I think that everyone could be content with just a grand slam home run.

The Machine’s Child by Kage Baker.

I have to admit that this book annoyed me somewhat, as the Company sequence is still not over, and this book does little but set up the pieces for the grand finale. It seems to be that it’s going to end with an incredible bang (supposedly in the next and last book), but we’re still not there yet, so there isn’t a lot to say.

Her Smoke Rose Up Forever by James Tiptree, Jr.

This book makes me angry because I’d barely heard of Tiptree before I picked it up. I have tons and tons of old year’s bests and collections from the period in which she was writing, but I don’t think that I’d read a single story from this collection before, and that’s a crying shame. Many of the stories in here are totally amazing and deeply depressing. You will not find anything nice said about human nature, but you will find some really excellent prose, and the titles! Wow. You owe it to yourself to find a copy of this and read it. It is one of the building blocks upon which modern science fiction is built (indeed, William Gibson owes Tiptree a particularly large debt, only subtly acknowledged, as far as I know), and it’s terrible that her work is more or less unknown to the modern reader (at least of my age group). Hopefully the new biography will belatedly bring her more readers.

Scar Night by Alan Campbell.

There was a lot of pre-release buzz for this one, but it doesn’t really live up to it, in my opinion. It’s a first novel, plain and simple, and doesn’t nearly have the depth or density or reach of China Mieville’s similar and, honestly, much better, work. Still, it isn’t terrible and it doesn’t rule out Campbell’s work becoming of more interest in the future, although if I were Campbell, I would ignore the fact that the book claims to be book one of a series and write about somewhere else for a while.

Memory by Linda Nagata.

I’m not all that familiar with Nagata’s books. This one isn’t terrible, but it’s light reading. There’s some interesting stuff here, but for all that the ending costs a lot, you don’t really know all that much more when it ends than when it begins (I have a feeling that it was meant to be book one of a series that didn’t get written), and I don’t think that the losses, at least at the end, are deeply felt or affect the characters very much. The world where the novel takes place is pretty interesting, and I feel like it would be pretty interesting to learn about what’s really going on there, but you don’t get there in this book.

End of the World Blues by John Courtenay Grimwood.

In this one, Grimwood continues being uneven. Stamping Butterflies was great, 9tail Fox interesting but less great, and this one falls into the latter category. You’re never quite sure what’s really going on or what the significance of the far future story thread is, and it never gets explained, or at least explained well enough to make me care. The best thing about this novel is the characterization of the near-future thread’s protagonist, a broken, conflicted loser who’s made some really nasty mistakes in the past. For all that he fails to become completely real at times, his story is interesting and carries you through the book well enough. I just feel that Grimwood romanticizes the outsider/pseudo-psychopathic male a bit too much. He has the chops to tell us a really interesting story, and he’s getting there. I’m betting that in a book or two he’s going to make a breakthrough and write something that’s huge and possibly quite important. I’m really looking forward to reading it, when it finally arrives.

Smelling the unsmellable.

Filed under: cog sci — Evan @ 12:56 pm

So reading Karl Schroeder’s blog (one of them, at least), pointed me to Mixing Memory, which got me thinking about cog sci stuff, which in train with reading about Scott Adams getting his voice back got me thinking about sense perception and pheromones. Presuming that human have pheromones, we can’t consciously detect that we’re ’smelling’ them. I use the scare quotes because although the purported pheromone receptors are in the nose, they are not the same receptors with which humans actually process smells that we can sense. So presumably we sense these things, but have no conscious knowledge of smelling them. It is mooted that they might affect behavior, but that’s not really what I’m interested in. So, assuming that these chemicals arouse some response in the brain that’s unconsciously processed, it seems to me that one could then, in an experimental context, associate these chemicals with other chemicals or stimuli that humans can consciously sense. Presumably, this would then create some sort of conditioned association with the other stimulus. Then, once the association had been conditioned, the observable stimulus could be removed, and the effects of the ‘unpercieveable’ stimulus could be measured (e.g. the subject could press a button when they thought that they ’smelled’ the pheromone.). Obviously I don’t have the knowledge or experience to design a proper experimental protocol, and certainly could not constructively interpret the results, but I think that it presents a unique sort of window into human sense perception. Essentially, everything else that we have receptors for, we can perceive, although we might not do so all of the time. Pheromones seem to be unique in that we can sense them, but not perceive the sensation. If it could be associated with something that we could sense… I have no idea what it would mean, but it sounds like something interesting to try.

Lisp is annoying.

Filed under: geekery — Evan @ 12:49 pm

So, the other day I was reading programming blogs, which seems to be the thing do do when you don’t actually want to work, and I ran into Erlang’s facility for binary pattern matching. Essentially it’s a rather nice syntax for taking a wodge (that’s a technical term) of binary data and decomposing it into variables. So:

<< foo:8, monkey/integer, bazzle:16, arrr:4/string, rest/binary >> = packet

will get you ubyte called foo with the first 8 bits of packet, an unsigned integer called monkey from the 9th through 40th bits, a ushort called bazzle, a 4 byte string called arrr (you could specify further what type of string, I think, if you needed something else), and a binary glob called rest with the rest of packet. I thought that this was pretty neat, and was thinking that making a nice, general facility for this in Lisp would make an interesting project, at least for me, because even though I know a fair amount about Lisp, I haven’t really used it that much. In any case, I was reading up about how someone might go about doing something like this when I ran into something in Practical Common Lisp that was more or less exactly what I was thinking of, expressed in a macro that really isn’t that long. it’s called define-binary-class and generates the class and a constructor that will read in binary data in a similar manner to the above. Plus, with some trivial modifications, I’m sure that you could alter it to make either structures or classes and to nest definitions, which is something that the static syntax of Erlang cannot do.

This, to me, is the primary virtue of Lisp, but it’s sometimes frustrating that most things are so trivial in the language that there’s nothing to do as an intro but leap into application code. This, perhaps, is one of the things that keeps people from getting into the language. You can do anything, but it’s either trivial or hard (or at least time consuming). Also, you’re forever doing things and then realizing that the massive standard library already has something that does exactly that. And then there’s the constant impetus to refactor the code into something cleaner, which the macro facilities of the language makes easy, fun and powerful, so the temptation to cat-hoover away all of your programming time cleaning up the code is pretty strong. That all of this is exacerbated by my lack of ability to think of enthralling software projects to work on is, I’m sure, incidental.

5 October, 2006

Notice:

Filed under: bookshelf — Evan @ 8:54 am

I don’t have time at the moment to write about it more fully, but you should likely read Peter Watts’ Blindsight right away.

4 September, 2006

I’m not feeling well so this likely makes little sense.

Filed under: bookshelf, reviews, short sf — Evan @ 10:24 pm

Things that I’ve read recently, and some brief reactions:

  • Asimov’s August ‘06. Some good stuff, some interesting stuff, some irritating stuff. I’ve an extended post in the pipeline that I will post soon if I can ever get over this problem with posts just stalling out on me (five or six of them now. It’s getting to be a problem).

  • Elantris by Brandon Sanderson. (NB: I tried to write this spoilerless, but found myself having to leave out too many things that I wanted to write about. So, heavy spoilers. If you like fantasy, skip this paragraph then go read it, and come back). This was pretty good, especially for a first novel. I found it enjoyable, but there were a couple of things that kept bothering me throughout (note that these are no indication that you shouldn’t read it, as it’s a fun story). Firstly, there are some things that grate against my personal preferences, mostly with regard to the treatment of religion in the setting. These won’t bother most people, so I won’t dwell on them further. Secondly, there’s a fair amount of idiot plot going on here to delay certain events until they’re supposed to happen, when, very often, it would make more sense and feel more natural if they were to happen earlier in the story. Also, there are a couple of revelations that just don’t really make any sense. Not big ones, but they aren’t well telegraphed enough, and it just sort of feels like they were pulled out of a hat to tie things together and make certain characters more monstrous than they are or to give them more things to fight against. I think that in particular the handling of the adjunct priest Dilaf could have been done more effectively, had he remained a more human kind of monster. Thirdly, while there is a good amount of remediation of the standard fantasy tropes of the noble prince and the fair (but bold and intelligent) princess, the common people here are treated too much like counters. You never see their faces, so it’s sometimes hard to care which group of noble assholes gets the prize. Also, the whole city of Elantris seems like a bit of a spoiler for people. I mean, it a bunch of random people just turn into magical gods every once in a while, I’d think that enough wives and children would get left behind so that someone would either figure out how to get everyone in on it, or get rid of it completely. I find it hard to stomach that the Elantreans are awesome just for handing out food and healing people. Finally, the solution to the magical problems posed in the beginning of the novel feels kind of weak to me, as the idea that none of the (well educated, immensely powerful, near-immortal) Elantreans would know how to fix the problem (yes, I know that they get slaughtered, but I doubt that the violence would be so complete that no one who knew the origins of the magic and was capable of figuring out how to fix it would have survived) would have been able to fix it.

  • Lethe by Tricia Sullivan. I haaaate Tricia Sullivan. I just want you all to know that. I hate her because she wrote this one when she was younger than I am now and it’s very, very well done, if a bit clumsy in places. It’s a horrible fucking criminal shame that Sullivan isn’t one of our best known authors. This one’s out of print, I think, but shouldn’t be impossible to find used.

  • The Doors of His Face, The Lamps of His Mouth by Roger Zelazny. Like most of Zelazny, in my experience, tremendously uneven. At his best, Zelazny is brilliant, but at his worst, he’s just barely adequate. I’m finding this one a bit slow going because of that. The bad stories are hard to get through, but the incredible ones make it worth it.

  • Look to Windward and Consider Phlebas, parts of State of the Art all by Iain (M.) Banks. Rereads, all of them. I have a long, rambling post about the Culture, the statement that Banks seems to be making with it, the contours of the entire loose series, and some wondering why Banks isn’t very famous in the US, despite being a best seller in the UK. If I can ever finish it and clean it up, I might post it here.

I’m sure I’m forgetting about some other stuff. Four months of Asimov’s down and five months to go (counting the double issues as two months). I think that I’m short a month on the to-read stack, but that’s likely because the place where I have them stacked is on one of my cat’s high speed paths across my room and so it’s likely under my bed or something.

Also, I’m opening comments, as an experiment, so say hello, if you want to.

27 August, 2006

Asimov’s, September 2006

Filed under: Uncategorized — Evan @ 8:39 pm

Three down, fourteen to go. I think. This time, we mostly have stuff from people that I’ve read before. There are two standouts in this issue, John Kessel’s “Sunlight or Rock” and Jack Skillingstead’s “The Girl in the Empty Apartment”. Rucker’s “Postsingular” is entertaining, but there’s something that I just don’t get about Rucker. Perhaps we’re coming at SF from two entirely different angles. I mean, we’re both computer people, both, from what I’ve read of his non-fiction on guestblogging at various places, interested in much the same things. But there are two things that bother me about him, really. For Rucker, a story seems to be a string upon which to hang shiny bright ideas. The ideas might be fascinating, but without a really solid narrtive to drive them, they just seem unrestrained. Plus, I think that he problablty writes too fast, without enough thought as to what’s actually going on with the story and paying far too little attention to the music of his language. I don’t know. The ideas are great, no doubt, and there’s no lack of them. He’s kind of a soft edged, stoned out Charlie Stross in that way, I guess, although Charlie is better, usually, at putting a story together.

“Sunlight or Rock” is a story set on the moon, in a kind of down and out little place where captial is king and life is a little cheap and seedy. It follows on a another moon story of his that I read so long ago that I don’t really remember it. Or maybe I just think that I’ve read it, beacuse looking back, it was in 2002 and I wasn’t reading the magazines then. Maybe it was in the years best? I’ll have to look it up, I remember reading it for some reason. I blather (writing too fast). It’s about a kid struggling to survive without enough money or work far from home and without any real friends. It doesn’t have a proper, satisfying ending, and for the most part it all swings around sports betting, which I couldn’t care less about. At the same time, it’s well written and the tone of the story is excellent. There’s something to be said for stories that don’t go anywhere. It’s like a pause in a novel where the author is doing nothing but moving the character from setting to setting and manages to make it beautiful anyway, just for the joy of writing good words.

“The Girl in the Empty Apartment” is something of a slipstream piece which isn’t usually my bag, honestly, but something about this one caught my attention. Since the action is more than a little surreal, it’s hard to say definitively what’s really going on here, especially as I don’t think that I’ve read any of Skillingstead’s other Harbinger stories. It’s felt, though, which is important. It’s a good read, and I’ll have to find more of his stuff.

Asimov’s April/May 2006

Filed under: Uncategorized — Evan @ 4:27 pm

This isn’t going quite as quickly as I had hoped it would, partially because of a major computer outage yesterday. Hooray for spending a lot of money when you didn’t want to, with the possibility of having to spend a lot more to get the data back. I haven’t been keeping my backups up to date as I should have, and I guess that I’m paying for it now. Oh well.

In any case. Back to the task, before I do some more computer surgery in hopes of being able to avoid having to pay for data recovery. The April/May issue of Asimov’s is their yearly double issues. There are a couple of people who I’ve never read before, and one that I want to point out.

I’d vaguely heard of William Shunn before, but I’d never read any of his stuff. It seems right now that it’s all magazine sales, which is unfortunate, because it means that they’re going to be hard to get ahold of, at least until someone manages to bring out a collection or something. I have no idea if he’s working on a novel, but on the strength of his story here, entitled “Inclination”, I really rather hope so. I’d buy it in a heartbeat, but maybe I’m not the best person to ask on that mark, as I’m still threating to reach sixty on the unread shelf, despite quite a high rate of consuming the things. At one hundred I’m going to stop buying for a couple of months, I promise. So, this one is good. Good enough that I would seek out his other work, were any of it available in anything other than micropayment type ebooks, which, while a valiant effort, don’t really work for me for some reason. Perhaps it’s something that I’ll talk about at some later date, as I dream about a way out of the wage-earner trap that acutally has some interest for me. Again, hopefully there will be a collection or a novel out soon, because I’d really like to get my hands on more.

I wanted to hate Greg van Eekhout’s “The Osteomancer’s Son”, as it belongs to a brand of fantasy that I really don’t like, but it’s a charming story in its way, and I bet that a lot of people who don’t have my builtin preconceptions will like it a lot.

“The King’s Tail”, by Constance Cooper was pretty all right, but I felt that it needed to be longer to really reach its full impact. Still, I’ll be keeping my eye out, as it was entertainingly told and could lead somewhere.

There’s some other interesting stuff here, a Liz Williams story in her Banner of Souls setting, an entertaining short short by Wil McCarthy, and some interesting thought on Pyr and the state of contemporary SF by Norman Spinrad. Not a bad issue at all.

23 August, 2006

Asimov’s June 06.

Filed under: bookshelf, short sf — Evan @ 8:33 am

I only finished one magazine last night, mostly because I spent too much time re-reading Iain M. Banks’ first SF novel, Consider Phlebas. It sucked me in, and I ran low on time. Unfortunately, I bounced off almost everything in this issue, with the lone exception of the Robert Reed story, “Eight Episodes”. I read at least half of every story, and the whole of a couple of them, but nothing grabbed me. To be fair, even the Robert Reed story wasn’t one of his better ones, just another meditation on light-speed and the loneliness of organic species. Elegantly written and inventive as usual, but not something that we haven’t seen from him before. As an aside, I really want to witness a drunken argument between Reed and Ken MacLeod about the place of humanity on a deep time-scale. I feel that it would be deeply amusing, as long as they weren’t too respectful of each other. The most interesting discussion would come from what I perceive as MacLeod’s hopefulness and Reed’s pessimism (yes, I know that Reed has immortal, vital humanity in the deep future stories too, but they are, to me, less deeply felt than MacLeod’s, as if Reed were trying to sell us a future that he desperately wants to believe in, but cannot).

Anyway. Not an auspicious beginning. Hopefully I’ll resist the siren call of Consider Phlebas/Look to Windward tonight and make it through two of them.

21 August, 2006

Shorts.

Filed under: bookshelf — Evan @ 7:01 pm

So, I did another bookshelf check the other day and the results are depressing.

Partially read
stuff. Unread
stuff.

  • Hardcover:

    • Unread: 4
    • Partial: 2
  • Trade Paper:

    • Unread: 18
    • Partial: 13
  • Mass Market:

    • Unread: 18
    • Partial: 3
  • Totals:

    • Unread: 40
    • Partial: 18
  • Grand Total: 58

So obviously I’m more than a little behind. And I’m going to the bookstore for the book club this afternoon, so I’ll likely get some more , because I have a problem. But that isn’t the issue that I want to talk about today.

If you look at the notes for the partially read stack of books, you’ll see that there’re two stacks of magainzes, F&SF and Asimov’s. Those stacks are respectively eight and nine issues tall. I buy them and then I put them on the stack and I never read them, because I have too many books to read. But 18 short magazines seems like a small enough number to movtivate myself to tackle in a week, assuming that I apply some determination to the process, and a lot of time. I feel like I should do something for it, though, so I’m going to attempt to write up the best/most interesting stories from each issue, and make a list at the end of people that I’ve not heard of who’re interesting, sort of a ‘names to watch out for’ thing. Of course, considering my history, now that I’ve announced it, it won’t happen, but I’ll see what I can do. Oh well.

« Previous PageNext Page »