Just upgraded and seems working fine, obviously what I did last time (fixing the smiley issue) works perfect in the new version.
I haven’t checked org page for couple of weeks, and found out I’m 307 now.
Well done, let’s see if I can make <300. ๐
Now here are steps to build a Windows application as for “hello, world” ๐
Create a message.lisp:
(use-package "FFI") (def-call-out messagebox (:name "MessageBoxA") (:library "user32.dll") (:arguments (hwnd int) (text c-string) (capt c-string) (type uint)) (:return-type int) (:language :stdc)) (defun main() (messagebox 0 "Hello World!" "Message" 0) (quit))
then run:
clisp -M “C:\Program Files\clisp-2.47\base\lispinit.mem” -x “(load \”message.lisp\”)(ext:saveinitmem \”message\” :init-function #’main :executable t :norc t :quiet t)”
now we have a message.exe under the same directory, run it, you will get a standard Windows message box like this:
Almost all stuffs mentioned here are coming from:
except I added “:quiet t” to avoid CLisp’s welcome messages printed out in screen.
Since I don’t have much to do this week and I cannot go anywhere, I decided to learn some Lisp stuffs as it does not need too much online resource, well, sort of.
I was trying to get online last time and it was super slow, finally I picked to use proxy in KR which seems to be the best.
So far seems things are working, it’s surely slow but obviously it’s acceptable.
Well, all because of thunderstorm in Beijing, so we spent 5 hours in Hohhot. It is said it was one of the worst day for Beijing airport, as Tianjin was full of the flights targeting Beijing, then Hohhot, then Shijiazhuang, and then Jinan, and at the same time we don’t know how many domestic flights just didn’t take off.
Crazy day, but good to be home, at last ๐
While I was trying to dig out how to play with lisp, especially how to create an executable from it, I came across this message posted to c.l.l:
http://groups.google.com/group/comp.lang.lisp/msg/a8ffbb6d53f6b3db
pretty much what I want ๐ I’ve managed to created a executable on my Windows box and it runs just fine, well, with some tweaks, and actually a follow up describe the Windows dll problem:
http://groups.google.com/group/comp.lang.lisp/msg/71544781ad46b5c3
Though problems I’m going to discuss are for symfony 1.2, I guess it applicable to 1.0 and 1.1 as well.
I finally got symfony works on godaddy shared hosting, I guess if I were running any sort of dedicated hosting, these problem could not have happened, as I have full control.
The first problem hit me is PHP version, symfony needs PHP5, and godaddy supports PHP5 – good. However, it seems godaddy’s default PHP is still PHP4 so have to set alias to make sure symfony script is interpreted by PHP5 instead of PHP4:
alias symfony=’/usr/local/php5/bin/php /path/to/symfony-1.2.7/data/bin/symfony’
after this, I got the problem, saying:
/usr/local/php5/bin/php: Symbol `client_errors’ has different size in shared object, consider re-linking
and turned out it was because of mysql client lib problem – I don’t know the detail yet, but seems /usr/local/php5/bin/php and /web/cgi-bin/php5 are both linked to /usr/lib/mysql/libmysqlclient.so.15, which works for /web one but not the /usr one. I did some tests and found /usr/lib/libmysqlclient.so.14.0.0 works perfect with /usr/local/php5/bin/php, so put this into my .bash_profile:
LD_PRELOAD=/usr/lib/libmysqlclient.so.14.0.0
note that /usr/lib/libmysqlclient.so.10.0.0 doesn’t work well as it’s too old to support modern (new) password encrypt/authentication.
By now I can use symfony do the development job, but problem are still there while I’m trying to browse from browser, the first thing is rewrite rules – these lines should be uncommented from web/.htaccess:
RewriteBase /
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.html$
RewriteRule .* – [L]
then I met the problem (which took me longest time to solve) with error:
Empty module and/or action after parsing the URL “/index.php” (/).
actually I should have got it solve earlier if I search on the web, there is a great article talking about the solution, and my problem got solved just after 1st part of solution mentioned by the blog – adding following lines to “all” section of apps/frontend/config/factories.yml:
request: param: path_info_key: REQUEST_URI
be careful with intending, original blog seems not doing the right thing and put “request” and “param” in same level, which is wrong.
Alright, by this time you will be able to play with symfony on shared hosting with godaddy. ๐
Pretty busy – reviewed bug list for next patch, group lunch for the first time in the past 6 months, some follow up triage after last week’s launch, arrange all vacation auto-response, and notify some other teams the arrangement while I’m not here, and so on.
I will pack tomorrow.
My watch is not a high-tech style, I have to manually tune the date if it is less than 31 days for that month. Obviously I forgot doing so this time, and till I read a blog from a friend, saying it’s first day of the second half of the year, I realize it is July now.
Nice, close to the time to heading back to Beijing, though I still need to check email at least daily, it is not a must and I don’t have to worry about anything in business, maybe other than lay-off ๐
Happy July. ๐