
"Ouch, me bum!..."
recommended:
Planet Lisp
Lisp
newsgroup
#lisp channel
CLiki
Common-Lisp.net
Practical Common
Lisp
On
Lisp
Uncommon
Web
CL
Gardeners
Common Lisp Directory
Lambda the Ultimate
latest posts Thomason: side-tracked, 24-04-2008 arnuldon: They exist for real!, 22-04-2008 Marcinon: A Common Lis.., 23-12-2007 aycanon: A Common Lis.., 22-12-2007 tiezeon: A Common Lis.., 20-12-2007
 not tested on Internet Explorer Sorry for the horrible color
scheme.
If it's a comfort: it looks a whole lot better on my laptop. to mail, put these in the right order: at com dot fallenfrukt stuij
|
| side-tracked
| 23-04-08, 16:35
|
|
|
Yet another year went by without me having a chance to go to the European Common Lisp Meeting. And I had so much hope for this year. Finally the stars seemed to have aligned themselves in a perfect constellation: Got that Lisp job? Check! Employer willing to pay your trip? Check! Got the money to pay for your own ticket if all goes awry? Check!
But then all went haywire: I got infatuated with the OLPC XO; the thing and the concept. Ordered the thing, the process of which was so strenuous and frustrating, I don't want to write it down, because just recalling the memories is to painful. But the physical device was not enough. To make a boring story short, my obsession brought me here, typing away on an XO in Kathmandu, volunteering for OLE Nepal. Yes, once again shamelessly copying Luke Gorrie, while still working for my ultracool CL job at Stix.to.
And while the whole of OLPC seems to fret and spirals into a depression over leaving team-members and rumours over XP (both concerns being quite unfounded as far as I can judge), we're totally psyched and upbeat about our pilot-launch on Friday in two rural schools.
Programmatically I've strayed of the one true path. Which is primarily the reason for this post. I have sinned my brothers. At OLE we're developing curriculum complimentary activities in Squeak, the Sugar stuff is in Python and the firmware is in Forth. And actually it's great fun learning a few new languages which you can put into direct use in a useful way. Forth being the most useless for our purposes, but which is by far the coolest of the bunch. And the Luke copying continues...
Here we're coming to the practical conclusion of this post. I won't bog you lispers down with posts about Nepal and OLPC and unworthy programming languages. I made another blog to harbour those kinds of things. The posts there tend to be a bit more structured and as of yet half of them are recycled from other places around the net. As of yet only one of them is about developing, and it's quite high level at that. But then again, what do you programming gods care about mortal wiles.
permalink
|
| last comment added by Thomas, 24-04-08, 08:32 |
| A Common Lisp web startup test-case, two years after the Reddit switch
| 18-12-07, 18:29
|
|
|
Memories, memories... Just a little bit longer than two years ago I had a plan to show that Common Lisp web programming wasn't such a disaster as the Reddit guys made it out to be. Never would I have imagined I'd be a paid Common Lisp web programmer working on a social networking site myself, two years later.
I thought it might be nice to offset the Reddit experience against the things we at (plug) stix.to are doing. In what way did we feel the problems they were mentioning?
Reddit summary
For you not in the know about this Reddit-CL horse which was beaten to death: In December 2005, Reddit (a vote up/down articles site a la Digg) switched from Common Lisp to Python. It created an uproar amongst people that like uproars, and Common Lisp was called all kinds of names.
Not so much by the Reddit people though. I've read up a bit on their Common Lisp experiences, but the Reddit folks didn't actually publish that much information about their CL setup and experiences. I mailed them about it but as for now no response. But what DO we know.
The biggest source of information I could find is their 'on lisp' blog-post:
1. "One of the biggest issues was the lack of widely used and tested libraries."
2. "Because of the low-level socket and threading code we had to write, Reddit would not run on my Mac, and I was always tethered to our FreeBSD development server. Not being able to program offline is a pain." We could generalize this as cross platform problems.
That's about it actually. I also scraped some suggested and/or second hand information from the internet:
3. Lack of CL coders
4. Acquisition requisite, in general outside pressure
This list is quite arbitrary and perhaps not fair as far as Reddit is concerned, but I feel it gives a nice selection of issues which people have been concerned with concerning CL.
Stix.to introduction
Stix.to is also a social site of sorts. At the core you can put post-it notes, chats, voices, pictures, videos... on any page on the internet. And those you can share them with friends and groups. In the case of chats, you can communicate with whoever is on the same page and has permission to see them.
The entire codebase of stix.to is written in Common Lisp. That is to say, html output is written in s-expressions and all our Javascript is written in Parenscript (if we choose to ignore a few quick hacks). This might be standard fare nowadays in CL circles, but nevertheless I can not emphasize enough the joy I feel editing Javascript and HTML with s-expressions. Using an s-expression aware editor it is so much easier writing, editing and traversing those s-expressions then their native representation.
Our most important libraries: we use UnCommon Web as web framework, Elephant for persistence, the in-house written cl-json for communication between client and server and, as mentioned earlier, Parenscript.
Walking the list
So how does the previous listed list of issues square up against what we have experienced here at stix.to?
1, lack of mature libraries
I would actually say that this is our major problem. That is to say, our biggest annoyance is in a few packages that need considerable tinkering, some of which would surely be available in your favorite popular language X. It's for example quite probable that your popular language X has got a JSON handling library, and we had to build it from scratch.
But then there are libraries like Elephant, which implements persistent CL objects. We worked also quite a bit to improve Elephant, by speeding it up in some places and by adding a Postgresql backend. Agreed this costs time and money, but it gives us an exceptionally flexible persistence tool, hard to implement in most other languages.
The same could be said for UCW. Not that we pushed the library forward so much, but UCW's development model doesn't put stability on the first place. But what you get back is quite a powerful web toolset, with an unusually cool set of features.
So for us, the only libraries that gave us trouble were the ones giving us special abilities. In general, we hardly needed things that didn't function adequately, and the things missing were easily added.
2, cross platform problems
I still wonder what special socket and threading coding magic was needed for what is in essence quite a straight forward site. But what do I know. We at stix.to actually also have the same kind of setup, but thanks to virtualization software nowadays this has become a non-issue.
Two third of us who code are using MacBooks but develop our service in Linux virtual machines. When we started using the macs we used the beta version of VMware Fusion (VMware for the Mac). So we don't have to run into the kind of problem mentioned above.
As a plus we got some extra goodies: Linux, Windows and Mac compatibility checking with just one laptop is really nice. Also we're planning to integrate VMware (or similar), Selenium, and Darcs to have an automated test in clean OS environments. Virtualization is so cool.
3, lack of CL coders
This one I never understood. I heard it a number of times and I refuse to believe that this is an actual problem. We recently got a guy to work for us who hacks the socks of your standard programmer, and we found him with no problem at all. He practically drifted in view the day we started talking about expanding the workforce.
I'd think it's the other way around. How many people can and would love to code Common Lisp; for money? And how many jobs are actually offered?
Or do people have actual experience with trying to attract Common Lispers, and failed to do so. I'd love to hear stories about that.
And if you can't find them, educate them. I talked to guys a Streamtech who learned CL at the job with seemingly little adaption problems. I read the same kind of thing about ITA.
4, outside pressure
The only info i have on outside pressure is through talks with (potential) investors. And they don't exert pressure at all. And I find it fascinating to see how little investors are interested in the technology behind the service.
Except this one investor who nodded both knowingly and deeply sceptical when we mentioned the name Common Lisp. After some inquiry we found out he took a Lisp course at university when he was younger. At some institute of computer science. Beard style. He told that people around him called it the institution of extinct computer languages.
Mostly though, the only thing they're interested in is how easy your service is to copy. And in that way our use of Common Lisp is actually a plus. They just give you a free pass to rave about all the advance over the top features Common Lisp provides. After which you pretty much have to shut up about programming, to not come across as a real-world-shunning nerd.
But anyway this playing field is nothing like those big company cultures I'm hearing so much about. As a startup anyway, there doesn't seem to be anything to be worried about. And once you get to the Reddit-like buyout level, to me this would seem more like a luxury problem.
As of other problems; I don't really see them. Perhaps I'm just blind. Numb through swimming in a morphine-saturated pool. Now go on and start your Common Lisp powered companies! After the first dip, the water is nice and warm; nothing to fear...
permalink
|
| last comment added by Marcin, 23-12-07, 16:34 |
| Eval assembly
| 5-11-07, 09:51
|
|
|
Related to the last post, it was good for Armish (my arm assembler) to see some use. Fortunately the mnemonic to opcode encoding went flawless till now, that's such a drag to debug. But it got clear quite fast that it needed some variable support. So now expressions surrounded by emit-asm escape symbols that are not assembler related:(let ((foo 'r4)
(bar 'r6))
(emit-asm
:loop
(stmib r3 (r3 foo_bar))
(b :loop)))
==> (:LOOP
(STMIB R3 (R3 R4_R6))
(B :LOOP))Lisp forms inside emit-asm can be escaped with (ea ...)
Furthermore I'm quite happy with the whole assembler in Lisp setup. For my current project I interleave assembler code with lisp code used to calculate what should be in it. Assembly code blocks are defined within macros which gather them in functions stored in hash tables.
At one point some assembly depends on Lisp code which depends on assembly which depends on Lisp code. Now granted, that code is a bit hackerish atm, but I'd guess that this way of coding might be a bit of a pain with the gcc model of doing things.
But then, in my eyes, getting an assembler out of a high level language environment like the one a Common Lisp implementation houses, thus loosing all its expressive powers, seems quite absurd to begin with.
other relevant changes:
- assemble now expects a list of expressions, not the different expressions themselves, so as to play nice with emit-asm
- armish now also depends on the tools lib umpa-lumpa
- added binary list handling directives
- string encoding can be set
- as a convenience when assembling, always append code with :code-end label, so one can branch to it if necessary
- standard encoding of (ldr literal) is twos compliment, to encode as positive integer, append it with :pi
- updated docs to reflect changes
permalink
|
| no comments yet, click here to add one |
| All the clichés apply
| 4-11-07, 15:53
|
|
|
Just finished some assembly string writing code and some skeleton setup routines for the Nintendo DS compiler, to get a bit into the assembly groove. It turned out to be both more easy and harder than I expected.
Easier because it only took about a hundred instructions to write quite a flexible writer if i do say so myself. The font is variable width, lines break on spaces (or line break of course), it checks for end of string, does different colors, all dynamically calculated. I DID use latin-1 encoding however in stead of some more scalable scheme. Oh the shame!
Didn't think you could express yourself so tight in assembly. I wrote something similar in C which took about half the amount of lines to express.
But writing in assembly was harder because my head isn't yet fitted with the amount of l1 cache required for this kind of task. My brain needs some training to acquire the ability to keep track of all these exceptions, pre-conditions and whatnot.
Related: to me programming assembly feels like an inherently hackish endeavour. "Goto considered Evil." What do you do with that kind of advise in an environment in which it is just about the only control flow mechanism. To not even speak about the extreme urge towards Quick and Dirty (from his desktop vantage point he tries to restrain me as much as he can).
And then there's this (premature?) optimization vice and code shrinking mania. It's not really a plus to know the cost of everything. I managed to push the bin from 33 kb till under ten, almost all of which is font data of course. I'm really proud... but who cares!?
On the verge of spinning this post to thin: if anybody knows the font type in the picture the thumbnail links to, I'd be grateful to know which it is. When I did the C version of this writer, I used a font I found on some closed source Gameboy Advance homebrew. And when I say used, I mean I let the program print all chars in it's charset, loaded it in an emulator, made a screendump, loaded the gif in the Gimp and manually wrote down the x and y coordinates of EVERY point of every char in the charset; so I would have something a bit flexible if need be. I remember taking the laptop on a Friday night to wine drinking friends and just type away while they were having fun, just to not feel so bored and lonely while on the job.
Yes, but anyway, the case is that it seems I've only got chars of this font in the latin-1 set. If there exist some more I might want to incorporate them some day. Although I don't really feel like it.
permalink
|
| last comment added by Phil!, 6-11-07, 17:58 |
|