vydd / sketch

A Common Lisp framework for the creation of electronic art, visual design, game prototyping, game making, computer graphics, exploration of human-computer interaction, and more.
MIT License
1.4k stars 67 forks source link

Can not make tutorial working #12

Closed anquegi closed 8 years ago

anquegi commented 8 years ago

Hi I load sketch and sketch-example, first my machine OSX EL Capitan description, slime and roswell:

CL-USER> (lisp-implementation-type) "Clozure Common Lisp" CL-USER> (lisp-implementation-version) "Version 1.11-r16635 (DarwinX8664)"

when I load sketch it works and also when samples are working


CL-USER> (ql:quickload :sketch-examples)
To load "sketch-examples":
  Load 1 ASDF system:
    sketch-examples
; Loading "sketch-examples"

(:SKETCH-EXAMPLES)
CL-USER> (make-instance 'sketch-examples:hello-world)
#<SKETCH-EXAMPLES:HELLO-WORLD #x30200289FC0D>
screen shot 2016-05-17 at 17 01 10

also the other examples work well

but when I try teh sample tutorial in the readme:

CL-USER> (ql:quickload :sketch)
To load "sketch":
  Load 1 ASDF system:
    sketch
; Loading "sketch"

(:SKETCH)
CL-USER> (in-package :sketch)
#<Package "SKETCH">
SKETCH> (defsketch tutorial ())

gives the sldb output:

(TUTORIAL
 NIL) can't be destructured against the lambda list (SKETCH-NAME
                                                     WINDOW-OPTIONS
                                                     SLOT-BINDINGS
                                                     &BODY
                                                     BODY), because it does not contain at least 3 elements.
   [Condition of type CCL::SIMPLE-PROGRAM-ERROR]

Restarts:
 0: [*ABORT] Return to SLIME's top level.
 1: [ABORT-BREAK] Reset this thread
 2: [ABORT] Kill this thread

Backtrace:
  0: (CCL::PREPARE-TO-DESTRUCTURE (TUTORIAL NIL) (SKETCH-NAME WINDOW-OPTIONS SLOT-BINDINGS &BODY BODY) 3 NIL)
  1: (DEFSKETCH (DEFSKETCH TUTORIAL NIL) NIL)
  2: (FUNCALL #<Compiled-function DEFSKETCH Macroexpander #x30200255E35F> (DEFSKETCH TUTORIAL NIL) NIL)
  3: (MACROEXPAND-1 (DEFSKETCH TUTORIAL NIL) NIL)
  4: (CCL::CHEAP-EVAL-MACROEXPAND-1 (DEFSKETCH TUTORIAL NIL) NIL)
  5: (CCL::CHEAP-EVAL-IN-ENVIRONMENT (DEFSKETCH TUTORIAL NIL) NIL)
  6: (CCL::CHEAP-EVAL (DEFSKETCH TUTORIAL NIL))
  7: (SWANK::%EVAL-REGION "(defsketch tutorial ())\n")
  8: ((:INTERNAL SWANK::%LISTENER-EVAL))
  9: (SWANK-REPL::TRACK-PACKAGE #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK::%LISTENER-EVAL) #x3020027C54EF>)
 10: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK::%LISTENER-EVAL) #x3020027C552F>)
 11: (SWANK::%LISTENER-EVAL "(defsketch tutorial ())\n")
 12: (CCL::CALL-CHECK-REGS SWANK-REPL:LISTENER-EVAL "(defsketch tutorial ())\n")
 13: (CCL::CHEAP-EVAL (SWANK-REPL:LISTENER-EVAL "(defsketch tutorial ())\n"))
 14: (SWANK:EVAL-FOR-EMACS (SWANK-REPL:LISTENER-EVAL "(defsketch tutorial ())\n") "SKETCH" 84)
 15: (SWANK::PROCESS-REQUESTS NIL)
 16: ((:INTERNAL SWANK::HANDLE-REQUESTS))
 17: ((:INTERNAL SWANK::HANDLE-REQUESTS))
 18: (SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK #<Compiled-function SWANK:SWANK-DEBUGGER-HOOK #x302000A1F26F> #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK::HANDLE-REQUESTS) #x302000BFD3BF>)
 19: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-INPUT* . #<SWANK/GRAY::SLIME-INPUT-STREAM #x302000BFC58D>) (*STANDARD-OUTPUT* . #<SWANK/GRAY::SLIME-OUTPUT-STREAM #x302000BFC21D>) ..))) #<CCL:COMPILED-LEXICAL-C..
 20: (SWANK::HANDLE-REQUESTS #<MULTITHREADED-CONNECTION #x302000AA3DFD> NIL)
 21: (CCL::RUN-PROCESS-INITIAL-FORM #<PROCESS repl-thread(13) [Active] #x302000BEB46D> (#<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%PROCESS-RUN-FUNCTION) #x302000BEB1FF>))
 22: ((:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (CCL:PROCESS))) #<PROCESS repl-thread(13) [Active] #x302000BEB46D> (#<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%PROCESS-RUN-FUNCTION) #x302000BEB1FF>))
 23: ((:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION))

So I d not know if this is an error in the tutorial, of course the main problem is that I do not know enouch common lisp and sketch particullary

Thanks in advance

vydd commented 8 years ago

Hello,

Thanks for trying Sketch!

The tutorial is being written for the current Sketch version, in which defsketch is changed to (defsketch sketch-name bindings &body body) - these changes will hit Quicklisp's next release. Until then, please clone the repo to ~/quicklisp/local-projects, along with https://github.com/lispgames/cl-sdl2 and https://github.com/lispgames/sdl2kit.

I'm going to update the README in a moment to communicate this until the next Quicklisp release is up.

Sorry for the inconvenience.

anquegi commented 8 years ago

Ok, thanks for this advice and for programming this nice library. I will try it

anquegi commented 8 years ago

Only to confirm that things work well with the current version.

screen shot 2016-05-18 at 12 50 28

Finally I would like to say thanks again for this nice library

joshgiesbrecht commented 5 years ago

Hi,

Given that the README still recommends installing via Quicklisp, could this still be fixed? Either update the Quicklisp package with the newer build or change the installation instructions?

I currently have installed it via quicklisp, now find out that's a problem, I've cloned the necessary repos to my local-projects folder but it still seems to be preferring the earlier installed package and basically this is a silly juggling act for someone wanting to try this (otherwise fantastic-looking) project out.

whitten commented 4 years ago

Does this work in Quicklisp now? What version number of Quicklisp do you need to run it?

joshgiesbrecht commented 4 years ago

Don't know about version number, but I just did a fresh install of absolutely everything and it's working fine as per the "tutorial" instructions on the main page here.