Version 0.2 of CL-ODE has been released. The only change is windows is now
supported.
Tom
_______________________________________________
cl-ode-announce mailing list
cl-ode-announce(a)common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cl-ode-announce
Hi!
On Wed, 08 Mar 2006 00:43:12 +0100, Andreas Fuchs <asf(a)boinkor.net> wrote:
> I would like to teach cl-irc about the goodness of external-formats,
> and because irc doesn't let users specify which external format to
> use, I need something as flexible as flexi-streams (-:
>
> So, once I've read an irc command (as a "line" of latin-1
> characters), I'd like to convert it to text that looks the least
> insane, which is why my code tries several external-formats in a row
> and returns as soon as it found one that doesn't throw an error:
>
> (defun try-decode-line (line external-formats)
> (loop for external-format in external-formats
> for decoded = nil
> for error = nil
> do (multiple-value-setq (decoded error)
> (ignore-errors
> (flexi-streams:with-input-from-sequence (in line)
> (setf (flexi-streams:flexi-stream-external-format in)
> external-format)
> (read-line in))))
> do (format t "~&tried ~s: ~S~% error: ~A~%" external-format decoded
> error)
> if decoded
> do (return decoded)))
If LINE is a string you want this:
(defun try-decode-line (line external-formats)
(loop for external-format in external-formats
for decoded = nil
for error = nil
do (multiple-value-setq (decoded error)
(ignore-errors
(with-input-from-string (in line)
(let ((flexi (flexi-streams:make-flexi-stream in :external-format external-format)))
(read-line flexi)))))
do (format t "~&tried ~s: ~S~% error: ~A~%" external-format decoded
error)
if decoded
do (return decoded)))
But actually I think you want LINE to be a sequence of octets, so this
is what you want:
(defun try-decode-line (line external-formats)
(loop for external-format in external-formats
for decoded = nil
for error = nil
do (multiple-value-setq (decoded error)
(ignore-errors
(flexi-streams:with-input-from-sequence (in line)
(let ((flexi (flexi-streams:make-flexi-stream in :external-format external-format)))
(read-line flexi)))))
do (format t "~&tried ~s: ~S~% error: ~A~%" external-format decoded
error)
if decoded
do (return decoded)))
Result:
CL-USER 11 > (try-decode-line '(228 246 252) '((:utf-8 :eol-style :lf)
(:latin-1 :eol-style :lf)))
tried (:UTF-8 :EOL-STYLE :LF): NIL
error: Unexpected value #xF6 in UTF-8 sequence.
tried (:LATIN-1 :EOL-STYLE :LF): "äöü"
error: T
"äöü"
But you'll need version 0.5.3 to see that because there was a typo in
the code which generated the error messages.
> Hrmpf! Am I abusing flexi-streams too much or is that a bug? How
> should one read externally-formatted data from an in-memory stream,
> anyway?
You forgot that you have to create a flexi stream first - in-memory
streams happen to be provided by the same library but they're
something different. Use MAKE-FLEXI-STREAM to turn them into
flexi streams.
> And are string-backed in-memory streams even allowed?
No. CL already has WITH-INPUT-FROM-STRING... :)
> Thanks for your time and for developing flexi-streams. In return, I
> hope to be able to buy you a beverage of your choice in Hamburg (-:
Nice. Looking forward to seeing you there!
Cheers,
Edi.
_______________________________________________
flexi-streams-announce mailing list
flexi-streams-announce(a)common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/flexi-streams-announce
I just installed cells-gtk-2006-02-16 on Fedora Core 4 using SBCL
0.9.10. I originally tried SBCL 0.9.3 but got fatal errors. I did
get one condition raised regarding redefinition of a constant, but
allowing it didn't seem to cause a problem.
When I ran (test-gtk::gtk-demo) I got the following error:
* (test-gtk::gtk-demo)
debugger invoked on a CFFI:LOAD-FOREIGN-LIBRARY-ERROR in thread
#<THREAD "initial thread" {A68C4C9}>:
Unable to load foreign library: libcellsgtk.so
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [RETRY ] Try loading the foreign library again.
1: [USE-VALUE] Use another library instead.
2: [ABORT ] Exit debugger, returning to top level.
(CFFI::HANDLE-LOAD-FOREIGN-LIBRARY-ERROR
"libcellsgtk.so"
"Unable to load foreign library: ~A"
"libcellsgtk.so")
0] 2
Attempting to build libcellsgtk.so as described in INSTALL.TXT
resulted in another error:
~> cd src/build/cells-gtk-2006-02-16/root/gtk-ffi/
~/<2>cells-gtk-2006-02-16/root/gtk-ffi> make
gcc -c gtk-adds.c `pkg-config --cflags --libs gtk+-2.0`
gtk-adds.c: In function 'gtk_adds_color_new':
gtk-adds.c:75: warning: incompatible implicit declaration of built-in function 'malloc'
gcc: -lgtk-x11-2.0: linker input file unused because linking not done
gcc: -lgdk-x11-2.0: linker input file unused because linking not done
gcc: -latk-1.0: linker input file unused because linking not done
gcc: -lgdk_pixbuf-2.0: linker input file unused because linking not done
gcc: -lm: linker input file unused because linking not done
gcc: -lpangoxft-1.0: linker input file unused because linking not done
gcc: -lpangox-1.0: linker input file unused because linking not done
gcc: -lpango-1.0: linker input file unused because linking not done
gcc: -lgobject-2.0: linker input file unused because linking not done
gcc: -lgmodule-2.0: linker input file unused because linking not done
gcc: -ldl: linker input file unused because linking not done
gcc: -lglib-2.0: linker input file unused because linking not done
gcc -shared -o libcellsgtk.so gtk-adds.o `pkg-config --cflags --libs gtk+-2.0`
I downloaded the pre-built library from the cells-gtk site,
copied it to /usr/lib, and reran (test-gtk::gtk-demo) successfully.
Regards,
Patrick
------------------------------------------------------------------------
S P Engineering, Inc. | The experts in large scale distributed OO
| systems design and implementation.
pjm(a)spe.com | (C++, Java, Common Lisp, Jini, CORBA, UML)
_______________________________________________
beep-announce mailing list
beep-announce(a)common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cells-gtk-devel
New release CL-EMB 0.4.3
CL-EMB is a library to embed Common Lisp and special template
tags into normal text files. Can be used for dynamically
generated HTML pages.
You can download it from
http://common-lisp.net/project/cl-emb/
or install with ASDF-Install.
CL-USER> (asdf:operate 'asdf:load-op :asdf-install)
CL-USER> (asdf-install:install :cl-emb)
Changes:
- Faster file reading (fast slurping from
<http://www.emmett.ca/~sabetts/slurp.html>)
- New template tag @insert for inserting (text) files.
Example:
CL-USER> (emb:register-emb "test13" "The file:<pre><% @insert textfile %></pre>")
#<CL-EMB::EMB-FUNCTION {5894326D}>
CL-USER> (emb:execute-emb "test13" :env '(:textfile "/etc/gentoo-release"))
"The file:<pre>Gentoo Base System version 1.6.14
</pre>"
_______________________________________________
cl-emb-announce site list
cl-emb-announce(a)common-lisp.net
http://common-lisp.net/mailman/listinfo/cl-emb-announce
On Sat, 18 Feb 2006 12:07:34 -0500, "Dan Muller" <s8ctxw402(a)sneakemail.com> wrote:
> In port-lw.lisp, FFI-MAP-TYPE, change :float to :lisp-float.
Yep, thanks, that (and adding :LANGUAGE :ANSI-C) did the trick! I've
uploaded 0.9.4 which should work now.
Could you please test? I'm a bit in a hurry because we're moving to a
new flat on Wednesday... )
Thanks for your help,
Edi.
_______________________________________________
rdnzl-announce mailing list
rdnzl-announce(a)common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/rdnzl-announce
On Fri, 17 Feb 2006 00:49:16 -0500, "Dan Muller" <s8ctxw402(a)sneakemail.com> wrote:
> My first post to this list...
Hi... :)
> Direct3D uses single floats throughout its interface, but in
> LispWorks for Windows, all floating point types are equivalent to
> double-float. So I've got this rather difficult situation, where
> RDNZL can never find a method if it takes a single float argument!
> Even if it could find it, a down-conversion from double to single
> float would be needed, which probably shouldn't occur implicitly.
>
> I tried explicitly calling System.Convert.ToSingle, but by the time
> I can get my hands on the return value, it has been turned back into
> a double! I haven't been able to figure out a way around this
> without modifying RDNZL, or writing some sort of .NET function that
> returned a boxed single. But I'm not sure that the latter wouldn't
> be unboxed, or that it would give the correct type for the method
> lookup in RDNZL.
Yeah, tough call. I don't see an easy general solution but for the
moment I've uploaded version 0.9.3 which offers the following
workaround:
<http://weitz.de/rdnzl/#*coerce-double-floats-to-single*>
You should be able to (temporarily) rebind this variable to T for
single float arguments. Well, UNLESS your .NET method's signature
contains both System.Single /and/ System.Double.
Let me know if that helps or if you have a better idea.
Cheers,
Edi.
_______________________________________________
rdnzl-announce mailing list
rdnzl-announce(a)common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/rdnzl-announce
Dear mailing list member,
As promised, here is another Gsharp progress report, again mainly for
those who follow neither the CVS mailing list nor the #lisp IRC
channel.
I have worked on several different things since the last progress
report:
* Key signatures are now Gsharp objects (as opposed to just
vectors) with their own protocol. I did not change the external
format yet again, and instead made it possible for the current one
to deal with either representation;
* Gsharp can now handle elements with zero duration. That turned
out to be a major reorganization of the code. This functionality
will be used for elements such as key signature changes and clef
changes;
* I changed the class hierarchy of elements according to a
suggestion by Christophe Rhodes, so that there is now an
additional class `rhythmic-element' that represents elements with
non-zero duration;
* The external format for representing buffer objects has been
modified, though Gsharp can still read the old format. The new
format is easier to extend with new types of objects. Instead of
using a dispatch macro character, there is now a single macro
character `[', which is followed by a fully qualified symbol name
that indicates the name of the class of the object;
* I reorganized the command tables so that the one used by the
command loop can be determined by the type of the current layer,
and the type of the element preceding the cursor. This makes it
easier to use the same key strokes for different kinds of elements
and different kinds of layers;
* I started implementing ties. The code for representing ties in
the buffer seems to be working. However, rendering ties is hard,
and requires access to the book by Ted Ross, which I have now
ordered so that I can finish this work. Rendering ties turns out
to be messy in other ways as well, since most rendering code at
the moment works "vertically" by measures, whereas ties need to be
processed "horizontally" by layers;
* I introduced two new packages esa-buffer and esa-io (that I hope
will become part of a separate ESA library one day) which contain
code adapted from Climacs that manages buffer/file i/o in an
application independent way. I made Gsharp take advantage of
these new packages to behave more like an editor application
should, with named buffers and Emacs-style file i/o (C-x C-s, C-x
C-w, etc);
* Gsharp now has an `info pane' (what Emacs calls "mode line") that
shows the name of the buffer, whether it needs saving, etc.
Documentation changes:
* I updated the documentation to reflect an old change from using a
CLIM interactor pane to using an ESA minibuffer. The
documentation is still not fully up-to-date, nor is it complete,
but it is better than it was.
New score:
* There is a new, partially-completed score in the Scores
directory. It is a tune used in a commercial on NZ TV.
Minor fixes:
* Fixed a bug that made Gsharp crash for empty clusters. These were
used in one of the scores in the Scores directory, but I had not
used that particular score to test Gsharp for a while. Now, all
the scores in the Scores directory should work;
* Fixed a bug that ignored the explicit x-offset of elements. This
bug was introduced when the spacing algorithm was altered. One of
the scores in the Scores directory needs explicit x-offsets in
order to avoid overlaps of elements in crossing voices;
* The temporary midi file generated by the `play' commands is not
put in /tmp. It is still not uniquely named, nor is it cleaned
up;
* Fixed a bug that did not recognize modifications to lyrics
elements so did not invalidate the corresponding element.
Related fixes:
* I modified the font viewer in the Fonts directory (another CLIM
application) to play nicely with the others, and not destroy the
port. Now the viewer can be used from the CLIM Desktop.
That's all for this time.
--
Robert Strandh
---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------
_______________________________________________
gsharp-announce site list
gsharp-announce(a)common-lisp.net
http://common-lisp.net/mailman/listinfo/gsharp-announce
On Thu, 9 Feb 2006 14:20:59 -0500 (EST), Jim Sokoloff <jim(a)sokoloff.com> wrote:
> I'll propose the following patch (attached) to invoke:
>
> Currently it takes an object (for an instance method) or a type name
> (for a static method).
>
> After this patch, object can also a cons of a loaded assembly and a
> type name, and it will call a static method on the type from that
> assembly.
Thanks Jim, I've uploaded a new version (0.9.2) which incorporates
your patch.
Cheers,
Edi.
_______________________________________________
rdnzl-announce mailing list
rdnzl-announce(a)common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/rdnzl-announce