Hi, I have been using OpenMCL and portable aserve. I ran into some trouble with character encoding, and after looking at the code decided that it would be difficult to fix. I am now considering alternatives.
I read somewhere that Hunchentoot runs on OpenMCL so I'm going to try it out.
Any experience with running Hunchentoot on OpenMCL, specially the bleeding edge OpenMCL?
Any experience converting a project from aserve to Hunchentoot?
Also I ran into a compile problem:
;Compiler warnings : ; Undefined function CCL::DEQUEUE-TIMER-REQUEST, in INVOKE-WITH-TIMEOUT. ; Undefined function CCL::ENQUEUE-TIMER-REQUEST, in INVOKE-WITH-TIMEOUT. ; Undefined function CCL::MAKE-TIMER-REQUEST, in INVOKE-WITH-TIMEOUT.
from port-mcl.lisp:
(defun invoke-with-timeout (seconds bodyfn timeoutfn) "Executes the function (with no arguments) BODY-FN and returns its results but stops execution after DURATION seconds and then instead calls TIMEOUT-FN and returns its values." ;; from Portable AllegroServe (block timeout (let* ((timer (ccl::make-timer-request seconds #'(lambda () (return-from timeout (funcall timeoutfn)))))) (ccl::enqueue-timer-request timer) (unwind-protect (funcall bodyfn) (ccl::dequeue-timer-request timer)))))
Probably the timer functions have been removed in some of the later versions of OpenMCL. Unless someone has a fix already I will dig into this.
Hi,
On Fri, 25 May 2007 13:01:07 +0200, "Lennart Staflin" lstaflin@gmail.com wrote:
I have been using OpenMCL and portable aserve. I ran into some trouble with character encoding, and after looking at the code decided that it would be difficult to fix. I am now considering alternatives.
I read somewhere that Hunchentoot runs on OpenMCL so I'm going to try it out.
Any experience with running Hunchentoot on OpenMCL, specially the bleeding edge OpenMCL?
You're asking at the right moment... :)
It seems we currently have problems with OpenMCL and I can't do much about it as I don't have a Mac. If you check the mailing list archives of tbnl-devel and flexi-streams-devel of this month, you'll find all the details.
I was close to removing OpenMCL support from Hunchentoot, but if you can help fixing the issues, that's fine of course.
Any experience converting a project from aserve to Hunchentoot?
Not me.
Probably the timer functions have been removed in some of the later versions of OpenMCL. Unless someone has a fix already I will dig into this.
Good.
Thanks in advance, Edi.
On 5/25/07, Edi Weitz edi@agharta.de wrote:
Hi,
You're asking at the right moment... :)
It seems we currently have problems with OpenMCL and I can't do much about it as I don't have a Mac. If you check the mailing list archives of tbnl-devel and flexi-streams-devel of this month, you'll find all the details.
Flexi-streams passes all its tests on the latest OpenMCL, I don't think that is the problem.
I was close to removing OpenMCL support from Hunchentoot, but if you can help fixing the issues, that's fine of course.
Any experience converting a project from aserve to Hunchentoot?
Not me.
Probably the timer functions have been removed in some of the later versions of OpenMCL. Unless someone has a fix already I will dig into this.
Or possibly these functions where never in OpenMCL. I think these functions (ccl::make-timer-request etc.) are defined in acl-compat, and some how never made it over to port-mcl. They are in a file called mcl-timers.lisp in acl-compat. Perhaps, if licensing allows, you could include that file.
Reading the mailing list archive, I noticed another problem that I also had.
... i get an error that says: Unknown http return code: 500
I have tracked this down. It is not related to flexi-streams, but to a defconstant in specials.lisp:
(defconstant +http-reason-phrase-map+ (make-hash-table)
When the file is complied and loaded that hash table is empty. I haven't checked with the OpenMCL developers, but I think this might be invoking undefined behavior.
CLHS: "An implementation may choose to evaluate the value-form at compile time, load time, or both."
If the compiler evaluates the (make-hash-table) both at compile time and load time, and optimizes away the constant lookup (directly uses that hash table as a literal) in the setter forms. The result would be as observed in openmcl.
I think either of these would work:
(defparameter +http-reason-phrase-map+ (make-hash-table) (defconstant +http-reason-phrase-map+ '#.(make-hash-table)
With these changes I can now get the test examples to work.
On Fri, 25 May 2007 18:07:33 +0200, "Lennart Staflin" lstaflin@gmail.com wrote:
Flexi-streams passes all its tests on the latest OpenMCL, I don't think that is the problem.
Yes, that's what I also observed, but we had different reports regarding earlier versions.
Or possibly these functions where never in OpenMCL. I think these functions (ccl::make-timer-request etc.) are defined in acl-compat, and some how never made it over to port-mcl. They are in a file called mcl-timers.lisp in acl-compat. Perhaps, if licensing allows, you could include that file.
The file doesn't seem to have a license - which is true for all of ACL-COMPAT as far as I can tell.
Besides, that doesn't look like the real strategy to me. I'd rather not have code in Hunchentoot which adds basic functionality to OpenMCL. If there's no better way to overcome this problem, I think Hunchentoot should require ACL-COMPAT on OpenMCL.
I have tracked this down. It is not related to flexi-streams, but to a defconstant in specials.lisp:
(defconstant +http-reason-phrase-map+ (make-hash-table)
When the file is complied and loaded that hash table is empty. I haven't checked with the OpenMCL developers, but I think this might be invoking undefined behavior.
Ah, thanks, I think you're right. I'll change that.
Thanks, Edi.
On Fri, 25 May 2007 18:41:25 +0200, Edi Weitz edi@agharta.de wrote:
Ah, thanks, I think you're right. I'll change that.
OK, I've made a new release which now hopefully works with the latest OpenMCL release. Please check.
Cheers, Edi.