Justin Heyes-Jones | 14 Nov 06:45 2010
Picon

lispbuilder fix

Just checked in a few files needed to fix a bug in the input code for
lispbuilder-sdl

There was a problem with the functions key-pressed-p and
key-released-p in that they should only fire for the single update in
which the key state changes.

Fixes are in the lispbuilder-sdl with-events macro in events.lisp and
some refactoring of input-util.lisp

Let me know of any issues.

Justin
Justin Heyes-Jones | 8 Nov 05:03 2010
Picon

Quicklisp

Finally got around to checking out Quicklisp and compared to the hell
I have been through getting asdf to work, and to stay working it's
amazing.

Unfortunately I ran into a problem with lispbuilder-sdl loading the
cocoahelper. Any idea what's going on?

Unable to load any of the alternatives:
   ((:FRAMEWORK #1="cocoahelper") (:DEFAULT #1#))
   [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]

Restarts:
 0: [RETRY] Try loading the foreign library again.
 1: [USE-VALUE] Use another library instead.
 2: [TRY-RECOMPILING] Recompile cocoahelper and try loading it again
 3: [RETRY] Retry loading component ("cocoahelper" "cocoahelper" "cocoahelper").
 4: [ACCEPT] Continue, treating loading component ("cocoahelper"
"cocoahelper" "cocoahelper") as having been successful.
 5: [ABORT] Give up on "lispbuilder-sdl"
 --more--

Backtrace:
  0: (CFFI::FL-ERROR "Unable to load any of the alternatives:~%
~S")[:EXTERNAL]
  1: (CFFI:LOAD-FOREIGN-LIBRARY LISPBUILDER-SDL-COCOAHELPER::COCOAHELPER)
  2: (SB-FASL::LOAD-FASL-GROUP ..)
  3: ((FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK))
  4: (SB-FASL::LOAD-AS-FASL ..)
  5: ((FLET SB-FASL::LOAD-STREAM) ..)
  6: (LOAD #P"/Users/justinhj/.cache/common-lisp/sbcl-1.0.37-darwin-x86-64/Users/justinhj/.sbcl/site/lispbuilder-sdl/cocoahelper/cocoahelper.fasl")[:EXTERNAL]
(Continue reading)

Elliott Slaughter | 10 Oct 05:56 2010
Picon

Font error in SBCL

Hi,

I tried to compile the newest lb-sdl on SBCL 1.0.35 on Linux recently, and got the error below. Does anyone know what causes this?

* (asdf:oos 'asdf:load-op :lispbuilder-sdl)
[ ... ]
; compiling (DEFUN GET-FONT-ASCENT ...)
debugger invoked on a SB-INT:STREAM-DECODING-ERROR in thread #<THREAD
                                                               "initial thread" RUNNING
                                                               {AA03A69}>:
  decoding error on stream
  #<SB-SYS:FD-STREAM
    for "file /tmp/eslaught/lisp/asdf/lispbuilder-sdl/sdl/font.lisp" {BA7DEC1}>
  (:EXTERNAL-FORMAT :ASCII):
    the octet sequence (226) cannot be decoded.

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ATTEMPT-RESYNC   ] Attempt to resync the stream at a character boundary
                         and continue.
  1: [FORCE-END-OF-FILE] Force an end of file.
  2: [INPUT-REPLACEMENT] Use string as replacement input, attempt to resync at
                         a character boundary and continue.
  3: [TRY-RECOMPILING  ] Try recompiling font
  4: [RETRY            ] Retry performing #<ASDF:COMPILE-OP NIL {B131B81}> on
                         #<ASDF:CL-SOURCE-FILE "font" {AED0001}>.
  5: [ACCEPT           ] Continue, treating #<ASDF:COMPILE-OP NIL {B131B81}> on
                         #<ASDF:CL-SOURCE-FILE "font" {AED0001}> as having been
                         successful.
  6: [ABORT            ] Exit debugger, returning to top level.

(SB-INT:STREAM-DECODING-ERROR
 #<SB-SYS:FD-STREAM
   for "file /tmp/eslaught/lisp/asdf/lispbuilder-sdl/sdl/font.lisp" {BA7DEC1}>
 (226))
0]

Any assistence would be appreciated. Thanks.

--
Elliott Slaughter

"Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay

_______________________________________________
application-builder mailing list
application-builder@...
http://www.lispniks.com/mailman/listinfo/application-builder
Peter Keller | 21 Sep 08:15 2010
Picon

parser query

Hello,

How would I translate a parser grammar rule like this into lispbuilder-yacc?

foos : foo foos
     |

Would it be something like:

(foos
  (foo foos #'(lambda (one more) ...))
  (nil #'(lambda () ...)))

I tried the above, but it didn't evaluate the function associated with
the nil when it should have in the grammar.

Thank you.

-pete
Peter Keller | 12 Sep 08:52 2010
Picon

lexer problem

Hello,

I'm having a little bit of a problem with using lispbuilder-lexer. I'm
using sbcl 1.0.41.1 and the most recent lispbuilder-lexer gotten
via clbuild. I've created an ASDF package called 'ann-2' in which my
application resides and I'd like to utilize the lexer (and ultimately
the lispbuilder-yacc parser too).

When I use the example deflexer program and try to compile my application, 
I get this:

; compiling (DEFLEXER TEST-LEXER ...)
; file: /home/psilord/content/code/lisp/compilers/ann-2/ann-2.lisp
; in: DEFLEXER TEST-LEXER
;     (LISPBUILDER-LEXER:DEFLEXER ANN-2::TEST-LEXER :FLEX-COMPATIBLE
;                                 ("[0-9]+"
;                                  (RETURN
;                                   (VALUES 'LISPBUILDER-LEXER:INT
;                                           (LISPBUILDER-LEXER:INT
;                                            LISPBUILDER-LEXER:%0))))
;                                 ("[0-9]+([.][0-9]+([Ee][0-9]+)?)"
;                                  (RETURN
;                                   (VALUES 'ANN-2::FLT
;                                           (LISPBUILDER-LEXER:NUM
;                                            LISPBUILDER-LEXER:%0))))
;                                 ("[:space:]+"))
; --> PROGN DEFPARAMETER PROGN EVAL-WHEN SB-IMPL::%DEFPARAMETER 
; --> SB-IMPL::%DEFPARAMETER LISPBUILDER-REGEX:MACROEXPAND-REGEX-EXPR 
; --> LISPBUILDER-REGEX::COMPILE-EXPR-TO-MATCHER 
; ==>
;   '(LISPBUILDER-REGEX::ALT
;     (LISPBUILDER-REGEX::SEQ
;      (LISPBUILDER-REGEX::REG 0 (+ (LISPBUILDER-REGEX::CHARCLASS "0123456789")))
;      (LISPBUILDER-REGEX::HOOK #))
;     (LISPBUILDER-REGEX::SEQ
;      (LISPBUILDER-REGEX::REG 0
;       (LISPBUILDER-REGEX::SEQ (+ #) (LISPBUILDER-REGEX::REG 1 #)))
;      (LISPBUILDER-REGEX::HOOK #))
;     (LISPBUILDER-REGEX::SEQ
;      (LISPBUILDER-REGEX::REG 0 (+ (LISPBUILDER-REGEX::SPECCLASS SPACE)))
;      (LISPBUILDER-REGEX::HOOK #))
;     (LISPBUILDER-REGEX::SUCCEED T))
; 
; caught ERROR:
;   Objects of type FUNCTION can't be dumped into fasl files.

The above example works in the REPL, but seemingly not so when compiled
into fasls.

When I try to compile my larger (but still simple in practice) deflexer
example for the language in which I'm interested, I end up with this:

; caught ERROR:
;   (during macroexpansion of (DEFLEXER LISP-LEXER ...))
;   attempt to THROW to a tag that does not exist: LISPBUILDER-REGEX::REGEX-PARSE-ERROR

The deflexer syntax for the larger example looks reasonable to me. I don't
believe I made any errors. I can show you the larger deflexer example if you
need to see it.

Could I get some advice for how to proceed?

Thank you.

-pete
Christoph Senjak | 11 Aug 00:24 2010

Mixing sounds manually

Hello.

I dont want to use sdl-mixer if possible. I found cffi/audio.lisp,
including the SDL_OpenAudio-Command which takes a struct with a
mixer-callback. Is it possible to use this? Is there any reason not to
use it (i.e. callbacks too slow, etc.)?

I am asking this because these functions are not mentioned in the documentation.

Regards, Christoph
Elliott Slaughter | 27 Jul 08:22 2010

Announcing official lispbuilder-sdl-binaries downloads for OS X

Hi everyone,


After learning more than I ever wanted to know about Mac OS X dyld, finding that I need to upgrade my version of Xcode, and finally upgrading to OS X 10.6 to get the new version of the compiler, I am pleased to announce that my lispbuilder-sdl-binaries for OS X ***actually work***. :-)

The downloads are available at the following link:


For those of you who want a simple install, just extract these archives over your preexisting lispbuilder-sdl install. (They only contain C binaries, and not the Lisp source code.)

TODO: Make them asdf-installable. Shouldn't be hard, now that they work.

The gory details:

I had to hack the SDL_*.framework files using install_name_tool so that they pointed relative to <at> loader_path instead of <at> executable_path. This allows them to load when the libraries are in the same directory, rather than expecting them to be packed together in an app file. The caveat of this approach is that they will now always need to be in the same directory, so if you extract them to separate locations, they won't work.

--
Elliott Slaughter

"Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay
_______________________________________________
application-builder mailing list
application-builder@...
http://www.lispniks.com/mailman/listinfo/application-builder
Nicolas Martyanoff | 26 Jul 08:52 2010
Picon

problem with FILL-SURFACE-*


Hi,

I have a problem with FILL-SURFACE-*; calling:

	(sdl:fill-surface-* 100 100 100)

gives a segfaultĀ¹. *DEFAULT-SURFACE* is binded, and a clipping rectangle
is active.

Using:

	(sdl:fill-surface (sdl:color :r 100 :g 100 :b 100))

Works as intended.

Looking at the sourceĀ², the only difference I can see is that
FILL-SURFACE-* uses a (clipping t) key arg, while FILL-SURFACE uses
(clipping nil), therefore calling FILL-SURFACE-* with CLIPPING binded
to NIL.

I hope it will help finding the bug :)

Regards,

[1] http://paste.lisp.org/display/112817
[2]  sdl/surfaces.lisp 854

--

-- 
Nicolas Martyanoff
   http://codemore.org
   khaelin <at> gmail.com
_______________________________________________
application-builder mailing list
application-builder <at> lispniks.com
http://www.lispniks.com/mailman/listinfo/application-builder
Elliott Slaughter | 9 Jul 08:22 2010
Picon

Request for official binary downloads for OS X

Hi everyone,


I've been thinking: we provide binary downloads for Windows, but not for any other platform. On Linux, we don't need it. But on OS X, it might be nice. After all, OS X does not come with a C compiler by default, nor does it have a package manager to make downloading SDL easy. Since OS X has platform-specific binaries that need to be compiled (cocoahelper), it would be nice to provide those for download. Providing SDL might be nice too, but I think that's optional compared to providing cocoahelper.

I would be more than happy to use my system to build such binaries.

--
Elliott Slaughter

"Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay
_______________________________________________
application-builder mailing list
application-builder@...
http://www.lispniks.com/mailman/listinfo/application-builder
Nicolas Martyanoff | 5 Jul 15:25 2010
Picon

Bug with SDL:RENDER-STRING-BLENDED


Hi,

I may have found a bug with the RENDER-STRING-BLENDED method, when used
with a TTF font.

For the following tests, SDL:*DEFAULT-FONT* is bound to a TTF-FONT
instance.

While I have no problem with SDL:DRAW-STRING-BLENDED, using
SDL:RENDER-STRING-BLENDED returns a NIL surface.

By adding FORMAT forms to the lispbuilder libraries, I saw that calling
SDL:RENDER-STRING-BLENDED on a TTF-FONT instance calls
SDL:_RENDER-STRING-BLENDED_ which returns NIL (instead of calling
SDL-TTF:_RENDER-STRING-BLENDED_ which is correctly called for
SDL:DRAW-STRING-BLENDED).

While reading this code, I also found out in string-blended.lisp, line
66, the following form:

	(if surface surface *default-display*)

Maybe it should be:

	(if surface surface *default-surface*)

Right ?

(pkhuong idea on #lisp: replacing it by (or surface
*default-surface*) :))

Regards,

--

-- 
Nicolas Martyanoff
   http://codemore.org
   khaelin@...
Nicolas Martyanoff | 28 Jun 07:55 2010
Picon

WITH-OPEN-FONT missing

Hi,

I may be wrong, but it seems that WITH-OPEN-FONT, which is described in the
documentation, isn't in the sources (I used the last tarball).

Is there something I'm missing here ?

Regards,

--

-- 
Nicolas Martyanoff
   http://codemore.org
   khaelin@...

Gmane