Strange behavior with future

2012-12-29 Thread Oskar Kvist
Hi! I'm trying to play a sound in my application, using http://www.javazoom.net/javalayer/documents.html that lib. Anyway, I tried playing the sound in a future, so the main thread would not block while playing, like so: (future (-> in Player. .play)). But if I don't deref the future, the soun

Re: Unseemingly Eager Clojure Apprentice Seeking FizzBuzz Feeback

2012-12-29 Thread Laurent PETIT
2012/12/30 John Gabriele : > On Saturday, December 29, 2012 5:15:49 PM UTC-5, Sean Chalmers wrote: >> >> ... but changing it to more pure function would probably deal with that. > > > Another benefit of pure functions is that they're easier to test. > >> >> I'll have a play with 'when' as well, had

Re: Will the JVM will always likely, remain the primary Clojure implementation ?

2012-12-29 Thread Softaddicts
If longevity is your top most concern, I have a suggestion here: http://www.itarchitectforumblog.com/content/application_development/cobol_dead_language_rising.html And if you do not think it's all around us: http://itsacobolworld.blogspot.ca/?m=1 This thing has been alive and kicking since the

Re: Clarification on setting up Clojure, Lein and Emacs on fedora

2012-12-29 Thread Sayth Renshaw
On Sunday, 30 December 2012 15:31:42 UTC+11, Phil Hagelberg wrote: > > I believe Fedora ships with Leiningen 1.7.1, which is not what you > want. It's better to install manually, see http://leiningen.org; that > way you will get 2.x. Don't install Clojure or Contrib through your OS > package m

Re: Emacs launching 2 java processes

2012-12-29 Thread Phil Hagelberg
On Sat, Dec 29, 2012 at 7:12 PM, Alice wrote: > I'm using emacs with inferior-lisp setup to use lein repl. Everything > works fine, but when I start the repl, I see two java.exe processes on > my windows task manager. > > Is this normal behavior? Why two java processes not one are needed? This is

Re: Clarification on setting up Clojure, Lein and Emacs on fedora

2012-12-29 Thread Phil Hagelberg
I believe Fedora ships with Leiningen 1.7.1, which is not what you want. It's better to install manually, see http://leiningen.org; that way you will get 2.x. Don't install Clojure or Contrib through your OS package manager. The Emacs support for Clojure is documented here: https://github.com/tech

Re: Clarification on setting up Clojure, Lein and Emacs on fedora

2012-12-29 Thread John Gabriele
On Saturday, December 29, 2012 10:52:15 PM UTC-5, John Gabriele wrote: > > Sayth, > > Not sure I follow everything in your post, but here are some tips: > > 1. You don't need to "install" Clojure itself. Leiningen takes care of > that for you. See > > Whoops, sorry, forgot to finish typing that

Re: Clarification on setting up Clojure, Lein and Emacs on fedora

2012-12-29 Thread John Gabriele
Sayth, Not sure I follow everything in your post, but here are some tips: 1. You don't need to "install" Clojure itself. Leiningen takes care of that for you. See 2. Make sure you install Emacs 24. I don't know what the Fedora incantations are for this. 3. Once you've got Emacs 24 install

Re: Unseemingly Eager Clojure Apprentice Seeking FizzBuzz Feeback

2012-12-29 Thread John Gabriele
On Saturday, December 29, 2012 5:15:49 PM UTC-5, Sean Chalmers wrote: > > ... but changing it to more pure function would probably deal with that. Another benefit of pure functions is that they're easier to test. > I'll have a play with 'when' as well, hadn't tried that one yet. `when` prov

Emacs launching 2 java processes

2012-12-29 Thread Alice
Hi, I'm using emacs with inferior-lisp setup to use lein repl. Everything works fine, but when I start the repl, I see two java.exe processes on my windows task manager. Is this normal behavior? Why two java processes not one are needed? -- You received this message because you are subscribed t

Re: Trouble calling Dojo grid constructor from ClojureScript

2012-12-29 Thread Patrick Logan
I sent a note to the dojo list, so they're aware of the situation. Meanwhile it's an easy enough work-around to avoid the problem. -Patrick On Saturday, December 29, 2012 5:51:32 PM UTC-8, David Nolen wrote: > > Yes this is known problem w/ ClojureScript that could be solved if/when we > get p

Re: Trouble calling Dojo grid constructor from ClojureScript

2012-12-29 Thread David Nolen
Yes this is known problem w/ ClojureScript that could be solved if/when we get proper Keywords/Symbol types. David On Sat, Dec 29, 2012 at 8:46 PM, Patrick Logan wrote: > From what I can tell, dojo is testing an argument to see whether it has a > method named "call". dojo seems to be assuming t

Re: Trouble calling Dojo grid constructor from ClojureScript

2012-12-29 Thread Patrick Logan
>From what I can tell, dojo is testing an argument to see whether it has a method named "call". dojo seems to be assuming that if such a method exists, then the argument will not be a string. Then clojurescript seems to be assigning a function named "call" to the String prototype. And so these

Re: Clarification on setting up Clojure, Lein and Emacs on fedora

2012-12-29 Thread Moritz Ulrich
If you have a recent (24) Emacs, use M-x package-install and install clojure-mode and nrepl. nrepl is the successor-in-spirit of slime, as many people consider slime as deprecated. When you have access to leiningen 2 (strongly recommended), the whole setup simplifies to: 1) Install leiningen 2 & E

Re: cljs-clj interop

2012-12-29 Thread David Nolen
I think you've just formatted your code incorrectly. Did you try something like this? (extend-type js/Packages.clojure.lang.IFn IFn (-invoke ([this] (.invoke this)) ([this a] (.invoke this a))) ) On Sat, Dec 29, 2012 at 8:22 PM, Stuart Campbell wrote: > Hi all, > > I'm toying wit

cljs-clj interop

2012-12-29 Thread Stuart Campbell
Hi all, I'm toying with a way to use Clojure objects from a Rhino-based ClojureScript environment (https://github.com/harto/rhino-bridge). I've been able to export a Clojure function into the ClojureScript environment without too much difficulty. Ideally, I'd like to be able to call that function

Clarification on setting up Clojure, Lein and Emacs on fedora

2012-12-29 Thread Sayth Renshaw
Just want to make sure I get this right. I am running F18 and am setting up clojure. These would be the packages to install, correct? clojure.noarch clojure-contrib.noarch leiningen.noarch emacs-slime.noarch *For slime and the emacs repl* clojure-mode, slime, slime-repl and swank-clojure rest

[ANN] Hosted findfn

2012-12-29 Thread Anthony Rosequist
I love Anthony Grimes's (et al) findfn library, but it requires some local setup (mainly the JVM security config for clojail), so I decided to host it on Heroku. Features: - Access to findfn from any computer with no setup. - If your function has two ar

Advice on Clojure, Emacs, Lein setup on Fedora

2012-12-29 Thread Sayth Renshaw
Hi I am running F18 and wanting to setup and get goin in Clojure Just wanted to put a summary of the things I have got so far in case I have missed something easy obvious that will get me going quicker. *Fedora* To setup on Fedora I have installed these packages(emacs already installed) clojure-

Re: Unseemingly Eager Clojure Apprentice Seeking FizzBuzz Feeback

2012-12-29 Thread Sean Chalmers
Yay! Thanks for the feedback everyone. I originally had it as a 'cond' but because I was using 'println' directly in my fizzy function I was getting on 15 for example "fizzbuzz, buzz, fizz" but changing it to more pure function would probably deal with that. I'll have a play with 'when' as well

Re: [ANN] Dire, Erlang-style error handling

2012-12-29 Thread Michael Drogalis
The CL article is really interesting, thanks. What do you think of the idea of using Slingshot's try+ within Dire? On Saturday, December 29, 2012 3:55:13 PM UTC-5, Ben wrote: > > On Sat, Dec 29, 2012 at 12:44 PM, Michael Drogalis > > > wrote: > > I've never seen that before, Ben. Can you link

Re: Clojure mug templates

2012-12-29 Thread Nikita Beloglazov
Thank you, John. I've fixed this. Nikita On Sat, Dec 29, 2012 at 8:21 PM, John Gabriele wrote: > On Saturday, December 29, 2012 8:54:44 AM UTC-5, Nikita Beloglazov wrote: >> >> Hi >> >> I taught small clojure class at my university this semester. At the end >> of the class I printed "clojure" m

Re: [ANN] Dire, Erlang-style error handling

2012-12-29 Thread Ben Wolfson
On Sat, Dec 29, 2012 at 12:44 PM, Michael Drogalis wrote: > I've never seen that before, Ben. Can you link me? Overview of CL conditions/restarts here: http://www.gigamonkeys.com/book/beyond-exception-handling-conditions-and-restarts.html The Clojure lib was clojure.contrib.error-kit (http://ric

Re: [ANN] Dire, Erlang-style error handling

2012-12-29 Thread Michael Drogalis
I've never seen that before, Ben. Can you link me? Just pushed version 0.1.1 with these suggestions: - Tasks are now simple functions, not macros - Using metadata to keep track of handlers rather than an atom. - Fixed namespace collision issue - Pass original arguments of task function to error h

Re: Clojure mug templates

2012-12-29 Thread Shantanu Kumar
This is pretty cool, and a good idea for building screensaver on that theme. Shantanu On Dec 29, 6:54 pm, Nikita Beloglazov wrote: > Hi > > I taught small clojure class at my university this semester. At the end of > the class I printed "clojure" mugs for my students with their names. > Here I w

Re: ClojureCLR 1.5.0 RC 1

2012-12-29 Thread dmiller
The executables and DLLs under the regular binary download will work just fine under Mono. On Saturday, December 29, 2012 2:06:31 AM UTC-6, Shantanu Kumar wrote: > > > > On Thursday, 27 December 2012 23:15:04 UTC+5:30, dmiller wrote: >> >> ClojureCLR is caught up with all changes to ClojureJVM

Re: [ANN] Dire, Erlang-style error handling

2012-12-29 Thread Ben Wolfson
On Sat, Dec 29, 2012 at 10:13 AM, Michael Drogalis wrote: > On Saturday, December 29, 2012 9:57:56 AM UTC-5, Adam Clements wrote: >> One thing that worries me though. While this is fine for examples where >> you simply log the exception and move on, what if you need to do something >> more complic

Re: [ANN] Dire, Erlang-style error handling

2012-12-29 Thread Michael Drogalis
Thanks for the awesome feedback. On Saturday, December 29, 2012 9:57:56 AM UTC-5, Adam Clements wrote: > > Hey, > > I really like the idea of pulling out exception handling from the function > bodies. The try catch form has always bugged me a little bit. > > One thing that worries me though. Whil

Re: Clojure mug templates

2012-12-29 Thread John Gabriele
On Saturday, December 29, 2012 8:54:44 AM UTC-5, Nikita Beloglazov wrote: > > Hi > > I taught small clojure class at my university this semester. At the end of > the class I printed "clojure" mugs for my students with their names. > Here I want to share small javascript/html page I used to genera

Re: Will the JVM will always likely, remain the primary Clojure implementation ?

2012-12-29 Thread Andy Fingerhut
If you don't get a flood of responses, I think it is because in this thread and the one linked earlier that Leon Adler started, several different people have explained evidence that Clojure on the JVM has had active development for five years, it is open source, and no one knows of any evidence

Re: reduce-kv incompatible with subvec

2012-12-29 Thread Andy Fingerhut
I haven't taken the time to check whether that is correct or not, but the answer that is most likely the truth is "no one has yet had the time or interest to add such a thing yet". You are welcome to create a ticket describing the problem, and attach a patch to it that fixes the issue, and see

Re: Clojure mug templates

2012-12-29 Thread Mayank Jain
So nice :) Good stuff! On Sat, Dec 29, 2012 at 7:24 PM, Nikita Beloglazov wrote: > Hi > > I taught small clojure class at my university this semester. At the end of > the class I printed "clojure" mugs for my students with their names. > Here I want to share small javascript/html page I used to g

Re: [ANN] Dire, Erlang-style error handling

2012-12-29 Thread Adam Clements
Hey, I really like the idea of pulling out exception handling from the function bodies. The try catch form has always bugged me a little bit. One thing that worries me though. While this is fine for examples where you simply log the exception and move on, what if you need to do something more

Re: Unseemingly Eager Clojure Apprentice Seeking FizzBuzz Feeback

2012-12-29 Thread Laurent PETIT
2012/12/29 Nikita Beloglazov > > Hi > > I'd change your fizzy function so it returns a string instead of printing it. > This way it will be pure function and more functional-like. In doseq you'll > need (printlng (fuzzy x)) instead of > (fuzzy x). > > Nikita Beloglazov > > On Saturday, December

Re: Unseemingly Eager Clojure Apprentice Seeking FizzBuzz Feeback

2012-12-29 Thread Nikita Beloglazov
Hi I'd change your fizzy function so it returns a string instead of printing it. This way it will be pure function and more functional-like. In doseq you'll need (printlng (fuzzy x)) instead of (fuzzy x). Nikita Beloglazov On Saturday, December 29, 2012 3:35:38 PM UTC+3, Sean Chalmers wrote: >

Clojure mug templates

2012-12-29 Thread Nikita Beloglazov
Hi I taught small clojure class at my university this semester. At the end of the class I printed "clojure" mugs for my students with their names. Here I want to share small javascript/html page I used to generate templates for mugs. I hope someone find it useful. Page: http://nbeloglazov.git

Re: Unseemingly Eager Clojure Apprentice Seeking FizzBuzz Feeback

2012-12-29 Thread Michael Drogalis
Use a cond rather than nesting ifs. Otherwise looks good. On Saturday, December 29, 2012 7:35:38 AM UTC-5, Sean Chalmers wrote: > > Greetings all! > > I'm just starting out in the so far wonderful world of Clojure and to help > me get started I had a crack at one of my favourites, the FizzBuzz pr

Unseemingly Eager Clojure Apprentice Seeking FizzBuzz Feeback

2012-12-29 Thread Sean Chalmers
Greetings all! I'm just starting out in the so far wonderful world of Clojure and to help me get started I had a crack at one of my favourites, the FizzBuzz program. For anyone that isn't familiar with FizzBuzz, it is designed to count from 1 to N and take the following actions when certain con

Re: Will the JVM will always likely, remain the primary Clojure implementation ?

2012-12-29 Thread Leon Adler
That's unforeseeable because, that represents a very long time. Having said that, this statement deserves a resay... *The JVM will remain the primary target/platform for Clojure, while Oracle remains good i.e. it doesn't get Barmy*. What say the other people? On Saturday, December 29, 2012 3:5

Re: Will the JVM will always likely, remain the primary Clojure implementation ?

2012-12-29 Thread Sukh Singh
Having read the posts all over again, can I say that *the JVM will remain the primary target/platform for Clojure, while Oracle remains good i.e. it doesn't get Barmy *? Isn't that unforeseeable? On Thursday, December 27, 2012 4:56:52 PM UTC+5:30, Sukh Singh wrote: > > > > Hi, > > I have noti

Re: ClojureCLR errors on Mono Linux

2012-12-29 Thread Shantanu Kumar
Thanks Robert, will try that shortly. Shantanu On Tuesday, 25 December 2012 06:29:58 UTC+5:30, RobertLJ wrote: > > > Shantanu > > The best way to get going right now with ClojureCLR is to build it from > source. The following is the process to build ClojureCLR on Linux > (Assuming that the mon

Re: ClojureCLR 1.5.0 RC 1

2012-12-29 Thread Shantanu Kumar
On Thursday, 27 December 2012 23:15:04 UTC+5:30, dmiller wrote: > > ClojureCLR is caught up with all changes to ClojureJVM up to 1.5.0-RC1. > This includes all relevant bug fixes, the reducers library, reader literal > improvements, new threading macros and other goodness. See changes.md. > > T