Monday, November 25, 2013
Have I finally fooled Google?
Monday, October 21, 2013
Defining Pi
Sometimes, when working in Scheme, I'm surprised that pi is not defined. I'd define it myself, but to what precision? My current method is to exploit Euler's identity to get the basic precision supported by log. Is there a cleaner way to initialise this?
(define pi (imag-part (log -1)))
Monday, October 14, 2013
Information Hiding
I always thought it was silly if you have the source to 'hide' the implementation. The pointer to implementation pattern in C++ is the ultimate expression of this fetish, trying to move the guts out of the header (since there is a weird amount of required information in the header files) and into the source, where I guess it can be compiled and hidden in object code. Here I disagree with both the sentiment and the technique.
Monday, September 30, 2013
I finally get it
In the past, what I had done was something similar to
apt-get install package
and if package was unfortunately lagging (sbcl is a prime example where the repositories kept an old version, but anything under active development is going to have this issue) I would clone a git repo and build myself. Now, the development tree assumes, you know, that you have current versions of all the development tools, and all the development headers for all the dependencies. Since I had run off the apt track, I regressed ten years back and started package hunting, configure, scratch head, read error message, find next dependency, configure, scratch head...
Remember, this is the problem these package managers were supposed to solve. So I now see how it is solved.
(does not need privileges) downloads the patched sources to build the binary version in dpkg. This is great, you can modify the options a little, but still let dpkg know you have a version installed for this (to prevent a stupid binary being installed into /usr when the live version is in /usr/bin). However, it still gives me the stable/stale version. So this is where the next part comes in handy.
apt-get source package
will make sure that you have a workable toolchain to satisfy configure's needs. Now I clone the latest and greatest from git or svn, and apt-get build-dep package, and then I'm having nearly an 100% success ratio in building. I always knew the debian tools were the best, I had only forgotten why.
apt-get build-dep package
Saturday, September 28, 2013
Ventra, your wallet, and you.
This is great, except that you may three or four of these cards in your wallet. Looking over my recent activity, at least on train ride was paid by my bank atm card, and another was paid by my america express card. I guess simply holding my wallet up to the reader will not be sufficient, and instead I will need to carefully hold the ventra card alone up to the reader when entering a station. For the most part, it seems that this has been working fairly well, since I have less than a 20% error rate for cards essentially next to each other in my wallet.
This is only a quirk for me, since I don't have a monthly pass (which wouldn't have been used when I pay directly with a different card) and am not yet using the pretax fare payments through my employer. I can see this catching a number of people by surprise, and it's a departure from the previous chicago card chip, which would not accept outside payments, and would work right inside your wallet.
Tuesday, August 27, 2013
Nights
So, what have I been up to? I installed antiweb at beta-reduction, my vps at work. This was a simple case of (1) finding a CL implementation which works on CentOS with a nazi kernel eager to kill off any memory hogs -- in this case Clozure works marvels, SBCL fails to build for me, and building even CLisp proved troublesome, segfaulting the moment quicklisp was loaded; it's possible ecl is viable here, (2) install anti-web, (3) create /var/aw, (4) add a few dummy workers, in this case beta-reduction.com and iota.beta-reduction.com. What I'd love to do is investigate dynamic page generation, particularly using UCW. How workers handle cgi marshalling is yet beyond me, my light goals may be to implement simple pages in guile or ccl, with antiweb acting as a dispatcher. Everything I learned at work about what a LAMP site does is completely overthrown by this setup, since for one hub and two workers each at 512GB Virtual memory, thus I have over 1.5TB of VM allocations, which aren't triggering OOM conditions. In contast, it seems most programs assume they can and will use the memory they allocate, and controlling mysql and php allocations for customers is maybe 1/8 of my job.
I've started working again on 99 lisp problems, which keeps me busy this week. I'm surprised to look at previous times I started this and where I stopped. I must be getting more proficient, to have made it several problems further. The best part is solving an intermediate problem in one or two lines using the last result. I never understood mapcan until I needed it. I think there's an internal timer in me, if a problem takes more than one hour to solve, I tend to move on. This time I made it to problem twenty-seven : given a list of items acting as a set, generate all possible sets of disjoint subsets of a specified size, as
(defun group (set sizes)
; something interesting here)
Also, this is the first week of classes at Roosevelt, so I think I will not be there for this fall semester. I may contact Dr's Pivarski and Urbina to see if this Spring makes more sense. It hurts to be 3 courses from a MS, but I can't afford more time to a degree without an exit plan. I also can't spend 36-48 hours per week at work and then take 1-2 nights from my free time to go to school without making Beth sad panda. I guess college might not have been my thing. (It really was, but what can you do?)
Still plowing through French and English readings. Just finished 'The Spectator Bird' and 'Bug-Jargal', moving into 'Dernier jour d'un condamné'. Before that was 'La Philosphie dans le Budoir' and a collection of poetry from 'Le Chat Noir', which was interesting, though I wish it had had more Allais. I read Villette, which I think is perhaps at least as good as Jane Eyre.
Saturday, August 10, 2013
My Next Week, and my summer so far
Summer is winding down. In May, I started at WiredTree, with the expectation that after a few months I would be moving to night work. I just had the meeting with my manager, and Monday the 12th of August will be my last Nine to Five day in the office. I will begin my late work at 8PM on Wednesday the 14th. So my schedule will look something like Wednesday night to Friday night every week with Saturday nights also every other week. If it works out, I may not need to move my ballet tickets too much. If not, there's some flexibility in time off that I can take advantage of.
Training has been an interesting experience. I'm using linux in ways I never had, and dealing with much different aspects of the system. I'm seeing PHP up close, a language I never needed. I'm dealing with ill defined plugins to solve strangely ambitious problems, (I just want the page to load fast). I see the slime that inhabit the internet, smut peddlers, spammers, scammers, and people hawking little plastic pieces up close. I'm beginning to sympathise with them and understand their motivations. I may, gasp, end up revisiting Perl. Since I had always previously treated computers as really fast adding machines, the whole internet thing seems to have past me by without changing my habits too much. That's why my twitter account is quiet, my Facebook was deleted years ago, this blog gets a post when I feel like it. But I seem to pull the current emacs and sbcl branches at least once a week.