This is my first major Clojure program and my first major lisp-program
at all.
It unfortuneately has a few bugs. 1 minor where I don't handle an
exception when there is no file chosen when you open a playlist.
The big and annoying one however is that sometimes the player starts
playing 2 songs. I suspect this has something to do with the threading/
polling where I check if the song is complete or not.

I think the code in general is not very pretty. Maybe it is all the
Java interop that makes it look a bit cludgy. The logic is decently
separated but I don't feel all that satisfied with it.

It uses Derby as a database(just for storing basic playing-info(the
only thing it is used for is loading 10most played songs but if you
look in database.clj you can read the database and get the info out to
do something with that). Clojure-contrib's sql lib makes the database
interop very easy.
For the GUI I use Swing and Miglayout  and miglayout from Clojure-
contrib which I find very neat.

Start repl with:
C:\clojure>java -cp clojure.jar;C:/clojure/;C:/clojure/classes;C:/
javalibs/miglayout-3.6.2-swing.jar;C:/javalibs/mp3/jl1.0.jar;C:/
Progra~1/Sun/JavaDB/lib/derby.jar;C:/clojure/clojure-contrib.jar;
clojure.lang.Repl
user=> (load-file "C:/clojure/progs/mp3player/mp3player.clj")
#'progs.mp3player.mp3player/compile-player
user=> (progs.mp3player.mp3player/compile-player)
progs.mp3player.mp3player
user=>

here's a python script to run the player once it is compiled:
#!/usr/bin/env python
import subprocess

command = "javaw -cp C:/javalibs/jl1.0.1.jar;C:/javalibs/
miglayout-3.6.2-" + \
          "swing.jar;C:/clojure/clojure-contrib.jar;C:/clojure/
clojure.jar;" + \
          "C:/Progra~1/Sun/JavaDB/lib/derby.jar;
progs.mp3player.mp3player"

subprocess.Popen(command)



Finally, here is the code:

main:
http://paste.lisp.org/display/79566
guilogic:
http://paste.lisp.org/display/79567
utils:
http://paste.lisp.org/display/79568
database:
http://paste.lisp.org/display/79569
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to