Monday, Debtember 01, 2008
Various shades of grey
Now, if you agree that there must be something fundamental, in lisps designs, that drives them all to social failure, what could be the root causes? I don't think the scare factor induced by parentheses is a real reason. Just look at the kind of scary, steaming piles of crapware Java developers are willing to learn: they're OK with filling a 2 meters long shelf with manuals explaining how to have ORM and hibernation. The more verbose and unreadable a design pattern is, the more they love it. XML is much much scarier than sexps, yet consulting services are hysterically excited by it. No, really, it would take much more than parentheses to scare a Java programmer.
So what could be the features of “normal” syntax that are missed by sexps? [link added —Editor] Most notably, normal syntax gives you a feeling of what's idiomatic vs. what's weird. This means the syntax encourages you to write in a certain way, and hopefully everyone will be encouraged to write in the same style, thus understanding each other's code better. This helps bringing you interoperability and favors the writing of reusable code.
…
With sexps, it's much harder to create, maintain and convey such opinions in the code's appearance. Everything tends to look casual, and if it doesn't, just add a macro to make it look OK. It's difficult to build a shared seense of Good and Evil under these conditions, and without this consensus you'll have a hard time building a functional social group!
Via metalua metalua 0.4
I think this brings up yet another aspect of Lisp I don't like—it all looks the same, regardless of what the code is doing.
For example:
(assert (>= (cell-size (aref (aref (global-state-stack gs) (global-state-sundo gs)) y x)) 1))
(Not that I expect any self-respecting Lisp programmer would ever write such Lisp—I'm just making a point here.)
It's hard to see that it's rereferencing a structure field from a two dimentional array stored in an array of structures. The corresponding C code is a bit clearer on this (a real-life example taken from a program I wrote):
assert(gs.stack[gs.sundo][y][x].size >= 1);
It's clear that there are a few array and structure references (and a lot quicker to type, which seems to be an argument that those muddle-headed dynamic programmers love to make, not to say they like Lisp any more than I do).
Now sure, once you know what AREF
does, you can see the array
references, but what about that (global-state-stack gs)
business? Well … yes, it's a function, but it just so happens to return the
stack
field from the global state
structure named
gs
(but equally, it could have been returning the state-
stack
from the global
structure named gs
—but
you won't know until you track down the proper DEFSTRUCT
call).
Again, the C code makes it more visually explicit what's going on (well, in one aspect anyway—the meaning of the code is another thing entirely). Different things look different.
(Actually, now that I look at the C code, sundo
is a bad name
for that particular variable—it should really be sp
(stack
pointer) since that's what it's really used for; the sundo
name
derives from how I originally viewed the function of that variable, which was
keeping track of states to undo. I should probably rename that variable to
better reflect what it's actually used for, but I digress … )
Tuesday, Debtember 02, 2008
Neon jellyfish in one line of code
Last month I mentioned a homebrew operating system that allowed you to freely mix text and images in source code. It seems not to be the only system—you can now manipulate images directly in equations in Mathematica (link via reddit).
Drool …
Update at 2:04 am Wednesday, Debtember 2nd, 2008
For those of you who may have gotten multiple email updates, I apologize. I had an unfortunate email incident (I do updates via email) and five copies of this entry were posted.
Those responsible for the email problem have been sacked.
Wednesday, Debtember 03, 2008
Why didn't I get a copy of this memo?
X11 has these things called “selections.” They have names. There are really only two you need to know about: the Primary selection and the Clipboard selection. An application is said to “own” a selection when it raises its hand and says, “I have the Primary selection now.” Only one application can own a selection at a time, so when one app asserts selection ownership, the previous owner loses it.
…
One of the really cool, yet rarely used, features of the selection mechanism is that it can negotiate what data formats to use. It's not just about text. When one application asks another for the selection, part of their communication involves the requester asking the owner for the list of types in which they are capable of delivering the selection data; then the requester picks the format they like best, and asks for it that way.
X Selections, X Cut Buffers, and Emacs Kill Rings
I've been struggling with writing blog entries for years, and yet, here I am, one day short of nine years still writing posts the old fashioned way—painfully (that link shows the steps I go through in quoting a page for this blog, and as you can see, it's several manual steps).
But on an unrelated project to this blog (and work) I had to dive into the inner workings of the X11 clipboard. In doing so, I came across Jamie Zawinski's page on X Selections, X Cut Buffers, and Emacs Kill Rings, which pretty much describes at a high level how the whole X11 clipboard thing works, but there was this bit about half-way down the page:
The content negotiation mechansim is very powerful, and I wish more applications would take advantage of it.
You can experiment with content negotiation with other apps from an XEmacs lisp-interaction buffer. To see what types an app will convert its selection to, make a selection in that app, and then type:
(get-selection-internal 'PRIMARY 'TARGETS) ==> [TARGETS TIMESTAMP TEXT STRING LENGTH FILE_NAME OWNER_OS HOST_NAME USER CLASS NAME CLIENT_WINDOW PROCESS COMPOUND_TEXT] (get-selection-internal 'PRIMARY 'FILE_NAME) ==> "http://www.jwz.org/doc/x-cut-and-paste.html"
X Selections, X Cut Buffers, and Emacs Kill Rings
TARGETS
? There might be more to the current primary (or
clipboard) selection than just plain text? I must play around with this. And
lo' I did.
And I'm glad I did, because what I found was amazing.
I highlighted some text in Firefox (running under Linux and
X11), and selected (through
some code I had to write—there appears to be no other way to do this other
than XEmacs, which I
don't have installed, nor do I wish to install) the PRIMARY
TARGETS
, figure out what format the data is returned (an array of X11
atoms for what it's worth) and well … what do you know …
TIMESTAMP TARGETS text/html text/_moz_htmlcontext text/_moz_htmlinfo UTF8_STRING COMPOUND_TEXT TEXT STRING text/x-moz-url-priv
Hmm … So, instead of getting just the plain text (and let me pull some text from my own page here) …
Journals * Ceej's black book * Randomly Ever After * Orange is Holy * Wlofie's Online Journal * Azagthoth's Livejournal * Resilient's Livejournal * Ftrain
I can get the actual HTML?
Journals <ul> <li><a class="external" href="http://snippy.ceejbot.com/wiki/show/start" title="C. J.Silverio">Ceej's black book</a></li> <li><a class="external" href="http://www.asecular.com/ran/" title="TheGus">Randomly Ever After</a></li> <li><a class="external" href="http://www.springdew.com/" title="Spring Dew">Orange is Holy</a></li> <li><a class="external" href="http://wlofie.dyndns.org/diary/" title="Wlofie">Wlofie's Online Journal</a></li> <li><a class="external" href="http://www.livejournal.com/users/azagthoth/" title="Rob Summers">Azagthoth's Livejournal</a></li> <li><a class="external" href="http://www.livejournal.com/users/resilient/">Resilient's Livejournal</a></li> <li><a class="external" href="http://ftrain.com/" title="Paul Ford">Ftrain</a></li> </ul>
The answer appears to be yes (it's in UCS2 format for the record). And the URL?
http://boston.conman.org/2003/11/19.2
Well … I'll be … (and this too, is in UCS2 format).
Some quick hacking, and now I have a program that will select the URL and HTML from the Firefox primary text selection, format it
within a <BLOCKQUOTE>
tag, with the CITE
and
TITLE
attributes filled in, and the final <P>
tag with the citation information. And it's easy enough to run said program
inside the current editor I use.
Journals
Hypertext editing and the Semantic Web - The Boston Diaries - Captain Napalm
Wheeee!
Okay, enough nonsense … this has given me some ideas on an HTML editor …
Update on Tuesday, November 29th, 2011
Because someone asked, I made the source code available for download. There's not much in the way of documentation, but I figure that if you understand what this is doing, then you can probably compile it without issue.
Saturday, Debtember 06, 2008
Flying bicycles, floating women and jumping on the bed! Oh my!
For Bunny's Mom's birthday, we (along with Bunny's brother) went to see Corteo—Cirque du Soleil which is currently playing in Miami (in a big top tent no less!). The tickets were rather expensive, but seeing a Cirque du Soleil live was certainly worth it.
From kids bouncing on a bed to rolling around in huge hula hoops to the very surreal Helium Dance (which you have to see—it's just … out there, no pun intended).
But perhaps the most impressive act of the show was two acrobats, male and female, doing what can only be described as a human trapeze act (kind of like this act, but two of them on the same pair of ropes at the same time (sorry, couldn't find a clip of the actual act—apparently some of the acts change out from time to time). And then there's the man riding a bicycle in the air (again, I can't find a clip).
And at times, there's just too much stuff going on at once on the stage (circular as it can rotate because the audience surrounds the stage). It's just an incredible show to see live.
Sunday, Debtember 07, 2008
Much better than what you get at the store
Sunday morning (okay, Sunday afternoon) and here I am enjoying a lovely homemade Pop Tart™ I made the other day, courtesy of Alton Brown.
Yum!
A Young Mad Scientist's First Alphabet Blocks
For Jeff, because he's such the mad scientist: A Young Mad Scientist's First Alphabet Blocks (or rather, for his kids when he has them).
[Hmm … I see that Jeff is looking for minions but the picture of the want-ad isn't big enough to read and gosh darn it, I've always wanted to know how such minions are recruited. I'll have to ask Jeff next time I see him … ]
Tuesday, Debtember 09, 2008
It's the Radio Shack Auto Parts Store!
Bunny and I were in Indiantown for her Mom's birthday. While there, we headed off to the local Radio Shack to buy a blank CD to test the CD writer in her Mom's computer.
It was not your typical Radio Shack, unless I missed the memo and they've merged with an auto parts store recently. It was very odd, seeing overpriced audio cables next to overpriced jumper cables.
Waiting … waiting … waiting
“Are you on the way back to Boca Raton?” asked Smirk.
“Not yet. Why?”
“Well, can you stop by The Data Center on the way home? There's a box there that needs rebooting.”
“Okay,” I said and hung up.
So that's how I found myself standing in The Data Center at 11:45pm waiting for a recalcitrant box to finish running fsck
. It may be a fast box, but the drives are either ridiculously huge, ludicrously slow, or both.
Sigh.
And there's only so much web browsing one can do at the command line.
Wednesday, Debtember 10, 2008
beep beep beep beep beep beep beep beep beep beep beep beep beep beep
2:17 am and I'm still waiting for that server to finish fsck
ing. It
wouldn't be so bad except for two things:
- the server is in single-user mode, so I have to stick around until it
finishes running the
fsck
to kick it into multiuser mode (which brings all the services like mail and web back up) and - this incessant beeping that a piece of equipment here keeps making. Beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep … it's driving me insane!
So, until next time … beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep …
Beats
You know, after three and a half hours the beeping has strong beat you can dance to.
Debeep beep beep beep. Debeep beep beep beep. Debeep beep beep beep. Debeep beep beep beep. Debeep beep beep beep. Debeep beep beep bop. Debeep beep beep bop. Debeep beep beep bop. Debeep beep beep bop. Debeep beep beep bop. Debeep beep bop bop. Debeep beep bop bop. Debeep beep bop bop. Debeep beep bop bop. Debeep shabeep bop bop. Debeep shabeep bop bop. Debeep shabeep bop bop boom. Debeep shabeep bop bop boom. Debeep shabop beep beep boom. Debeep shabop beep beep boom. Debeep shabop beep beep boom. Debeep beep beep beep.
Can you dig it?
It only took 5 and a half hours …
5:27am. The recalcitrant machine is back up and running. The lights in The Data Center hate me though—apparently, fluorescents don't like doing that whole rave party thang.
Thankfully, I can leave the beeping.
It might help your case if you actually owned the item before selling it …
This just landed in my email:
- From
- Dan Johnson <dan@domainguardsystem.com>
- To
- sean@conman.org
- Subject
- XXXXXXXXXX.com for the owner of XXXXXXXXXX.org
- Date
- Wed, 10 Dec 2008 14:02:38 -0600 (CST)
Hi,
The domain
XXXXXXXXXX.com
has recently become available for us so we are offering it to you, because you are the owner of its.org
version.Domain Guard System is intended to assist our clients with their promotion on the Internet. We use many methods to increase the effectiveness of a client's presence on the Web. Securing
.com
domains for anyone using another extension for their site is one of them.There are several reasons why owning a
.com
is of great importance for any domain holder:
It's in the essense of Internet:
.com
is most popular and widely used, and the typical user usually supposes that he/she will find you atXXXXXXXXXX.com
.A lot of companies and organizations who use other extensions as primary (
.net
for Web services or private sites,.org
for non-profit organizations etc.) are securing.coms
not to lose the visitors who are seeking them there.With
.com
, you will be free to use both your.org
and.com
so you will only gain visitors.By owning the
.com
, you will be sure to stay #1 in your own name space.If you are interested in this domain, please act quickly, as we soon intend to bring it to the auction where the acquisition cost will be higher than now.
Please use the link below to discover the current cost of the domain, read more about the advantages of owning a .com and get information on the details of the purchase and domain transfer procedure:
Secure
XXXXXXXXXX.com
now![link deleted —Editor]
Best regards,
Dan Johnson
Domain Guard System
mailto: dan@domainguardsystem.com
Oh really?
I decided to see if they had a parked page on XXXXXXXXXX.com
and no, no website. Heck, there
didn't appear to be any DNS
information for the XXXXXXXXXX.com
domain. I checked to see of the domain in question was even registered, and
well …
[spc]lucy:~>whois XXXXXXXXXX.com [Querying whois.internic.net] [whois.internic.net] Whois Server Version 2.0 Domain names in the .com and .net domains can now be registered with many different competing registrars. Go to http://www.internic.net for detailed information. No match for domain "XXXXXXXXXX.COM". >>> Last update of whois database: Wed, 10 Dec 2008 16:25:08 EST <<<
Now it's getting interesting. Let me check with my registrar to see if I
can register XXXXXXXXXX.com
… well,
how do you like that? It's available! I can register it right now for
$15.95 (yes, I know, not the cheapest registrar out there, but I've been
using them for years now and never had a problem with them, and if it ain't
broke, don't fix it).
So, how much is Domain Guard System asking for it?
Here's How To Buy
The price for XXXXXXXXXX.com is: $99.00
Please click on the “PayPal—Click Here To Buy” button below to make payment via PayPal.
Payments made through PayPal are Safe and Secure. You can pay by credit and debit card, or using your PayPal account. Please note, that the credit card information you submit is only viewable for PayPal.com and not for us.
The refund will be issued on your payment in case of any problems with the domain transfer.
Once paid, your domain name information will be delivered to your email address in next 15 to 30 minutes.
Please read our FAQ if you have more questions concerning purchase procedure and further domain management.
$99? And Domain Guard System isn't even squatting on it?
Sometimes I think I'm in the wrong business.
Thursday, Debtember 11, 2008
I'm not the only one
I found the following in my email box today:
- From
- XXXXXXXXXXXXXXXXXXXXX
- To
- sean@conman.org
- Subject
- the domain con guy email
- Date
- Thu, 11 Dec 2008 00:04:24 EST
Hi, I just read your post on your site about the domain name guy. I did a search for
domainguardsystem.com
because I has just received the same email from him, only of course a different domain. When I checked on the.com
domain of the.org
that I used to own, it was available also. This silly person is trying to sell domains he does not own for a huge markup. You can buy the name with GoDaddy for $7.69 using a discount code and probably cheaper at other places, and he wants to sell names he does not own for $99!! Unreal … At any rate, I am glad you posted about it. He only bought his domain in October, so he is fairly new at this and seems to be targeting the owners of dot orgs right now.Cindy
Glad I could help, Cindy (and it seems that Cindy blogged
about domainguardsystem.com
as well).
Friday, Debtember 12, 2008
Forget selling domains you don't own, how about charging people for bidding in an auction?
I was fascinated to discover the auction hybrid site swoopo.com (previously known as telebid.com). It's a strange combination of eBay, woot, and slot machine. Here's how it works:
- You purchase bids in pre-packaged blocks of at least 30. Each bid costs you 75 cents, with no volume discount.
- Each bid raises the purchase price by 15 cents and increases the auction time by 15 seconds.
- Once the auction ends, you pay the final price.
I just watched an 8GB Apple iPod Touch sell on swoopo for $187.65. The final price means a total of 1,251 bids were placed for this item, costing bidders a grand total of $938.25.
Via reddit, Coding Horror: Profitable Until Deemed Illegal
So, let me get this straight. Swoopo charges people 75¢ per bid on an auction, and each bid only increases the bid amount by 15¢ …
Amazing.
I guess D avid Hannum was right, and I'm in the wrong business.
Saturday, Debtember 13, 2008
Alton Brown is my homeboy
“It's an early Christmas gift,” said Bunny, as she handed me a ticket. “Get your shoes on, we're going.”
“A ticket? For what?” I asked, as I looked down at it. “The Adrienne Arsht Center? Who's playing … oh. Okay, I'll get my shoes on right now.”
An hour and a half later, we're being seated for “An Evening with Alton Brown.”
Amazingly enough, when we arrived, we found out our seats, which were in Almost-But-Not-Quite-Nosebleed section were upgraded to the No-Longer-Need-Binoculars-But-Not-Quite-In-Spitting-Distance section. We were also asked to fill out a form asking Alton a question, and eight lucky audience members who did would be selected and get to ask him their question directly.
Unfortunately, our questions (mine: “What does your real family think of your TV family?” Bunny's: “Where do you get those wonderful shirts?”) were not picked.
The first half of the show he was interviewed by Michelle Bernstein, a renowned Miami chef (and winner of the James Beard Award), where we learned of his dislike of bottled water, his love of lime green leisure suits in high school, and that he does a mean Masaharu Morimoto impression.
In the second half of the show, he literally dumped all the bottled water out of the refridgerator onto the stage floor, broke the blender (which took two cooking students to fix), made Crêpes Suzette, and answered the questions of eight lucky audience members, where we learned that barbecue is America's contribution to world cuisine, his favorite Good Eats episode and that there will be no more Feasting on Asphalt (darn!).
All in all, a very nice Christmas gift indeed.
Update on Thursday, Debtember 18th, 2008
Okay, technically not an update as I'm writing this on the 18th, but well … anyway … another review of the show.
Tuesday, Debtember 16, 2008
“What's the most important thing about a coal mine, apart from coal?”
For Bunny (and heck, for Gregory): the theme song to Shaft, but with a twist … (link via news from me)
I love babalu!
And speaking of music, I just heard the local jazz station play a mashup of Desi Arnaz singing Babalu and the opening theme song to I Love Lucy.
Wow.
Thursday, Debtember 18, 2008
Strawberry rocks forever
Several days ago Bunny, her brother and mother went to a “u-pick” farm that had what appeared to be acres of hydroponically grown strawberries ripe for the picking. And pick they did.
So we're drowning in strawberries here at Chez Boca, wondering what to do with all these darned strawberries. That's when I remembered Alton Brown freezing them using dry ice. So Bunny got a five pound slab of the material, and an hour later, we have a ton of strawberry rocks, ready for the deep chill.
It's so neat living in the future …
Friday, Debtember 19, 2008
Living off the land
In April this year, we decided to test out the so-called Fife Diet, which was inspired by the Canadian 100-Mile Diet. Its creator claims that not only can you live on 100% Fife produce, but that you’ll eat better food doing so, and save the planet by reducing carbon emissions. We decided to find out if that was true, by trying to eat 100% Fife produce for a week.
In Part 1, we trek to the wilds of Fife and attempt to buy enough local food to last the week. Given that it’s farming country, how hard … could it be?
Kamikaze Cookery - three geeks cook. With Science.
How hard indeed?
Watching the episode is amusing just to see how much globalization has affected our eating habits (and not just here in the States, but even in rural areas of southern Scotland). For a farming community, there doesn't seem to be much farming.
But … is the globalization of food so bad? I can get all the fresh oranges I want here in Lower Sheol, but there's only so much of that I can eat. But I'm not limited to oranges, thanks to globalization. I can run down to a specialty market and pick up a bunch of 龍眼 (or, for those of you not hip to traditiona l Chinese, lóngyăn)—well, I could which is the point. I have more choice in what I can eat when (not to mention that with some searching, Wlofie could probably find lingonberries here in the States).
And then there's a small fact that the localvorian hippies don't mention—a bad year for crops in Fife isn't tragic! Sure, it's bad and the local economy is probably depressed, but with a global market for food, that means that the residents of Fife don't starve to death because the crops failed!
So score one for globalization.
Also not mentioned is that small scale “organic” farming is more labor intensive and has lower production than large scale “non-organic” farming, which means less food overall and more people go hungry (but not to worry—the local locust population won't be under threat of extinction—woot!).
Reading up on the results of the Fife Diet is amusing and instructional at the same time. And it's not at all clear if the three of them will make it to the end of the week.
(And for those who are intersted, a free-market look at buying locally.)
Isn't it ironic?
The irony of being a proponent of global food markets and freezing cheaper-than-imported locally grown strawberries is not lost on me.
Thursday, Debtember 25, 2008
Happy Kwanzaa Everybody!
© 2008 J. Rowling. Over Compensating
Monday, Debtember 29, 2008
Tossing cookies
The past week and a half has been very quiet here at Chez Boca. Christmas afternoon was spent in an orgy of paper ripping, followed by oohs, aahs and small squeals of delight (and no, I won't give any indication of who did the most squealing). The evening was spent decorating a metric buttload of Christmas themed sugar cookies.
When we made the cookies (a few days before), it was my idea to cut the center out of some of the larger ones just for a variation on a theme. On this tray, I know I painted the tree with the white snow flakes on it, and the larger man shaped one. The rest—don't recall. But I do recall that the royal icing (made from scratch) was very gooey. We used basting brushes for the green and red, and having run out of said brushes, used popsicle sticks for red (and yes, the orange there is actually red—blast that white color balance) and yellow.
The four gentlemen on this tray were all my work—three soldiers of various ranks, and one civilian running around barefoot. As we progressed, my work got more and more elaborate as I found it rather fun. Let's see … the christmas tree, the small blue star (or “Captain's Wheel” as Bunny called them) and the candy cane was also mine.
The more cookies we did, the more elaborate my designs became. The green guy with the orange center was my idea; basically, a large cookie with the center cut out, painted green, with an identical smaller cookie (which actually was the center cut out) painted red (yes, it's red, gosh darn it!) placed over the cut out hole.
And the angel in the lower right was another of my designs. If you look closely at the angel, you'll notice two small eyes, which required the use of tweezers.
Yes, I decorated cookies with the help of tweezers.
There's nothing wrong with that, right?
Yes, the man shaped sugar cookie in the lower left is sans pants (censored for your protection), and for you perverts out there, here's the NSFW uncensored sugary goodness.
The large girl in the top center is my work. I thought it would be cute to make a little girl holding a doll dressed just like her. Three cookies in the construction of that one, and later Bunny remarked that she wants to preserve it and possibly use it as a Christmas tree ornament.
Reminds me of a programming class I took in college—the professor actually instructed me to “stop with the overkill!”
I didn't listen then, and now, no one was telling me to stop with the overkill.
By this time, both of us where getting tired of slapping a rapidly drying icing onto cookies and it shows in this last batch of cookies—nothing terribly complicated. Or rather, nothing complicated by me—I was pretty much tapped out at this point.
But it was fun, and the cookies, they are good … nom nom nom