Re: Reuse of generic Clojure/ClojureScript code?

2011-10-07 Thread Alen Ribic
Thanks Dave for sharing you current strategy for reusing generic Clojure/ClojureScript code. Have a look at the following dev thread where some ideas have been shared and feel free to comment: http://groups.google.com/group/clojure-dev/browse_thread/thread/831b74363da10187/3403e5ccbc488bc3 I

Referencing Clojure code from the ClojureScript namespace

2011-08-08 Thread Alen Ribic
It seems that the only way to reference Clojure code [1] from the ClojureScript namespace is via the ns require-macros keyword. Is this correct and if so, why the reference to macros only and not to general functions too. (I'm sure there is a good reason if it is the case; I'm hoping to get a

Re: Referencing Clojure code from the ClojureScript namespace

2011-08-08 Thread Alen Ribic
On Aug 8, 8:37 pm, Chouser chou...@gmail.com wrote: On Mon, Aug 8, 2011 at 12:59 PM, Alen Ribic alen.ri...@gmail.com wrote: It seems that the only way to reference Clojure code [1] from the ClojureScript namespace is via the ns require-macros keyword. Is this correct and if so, why

Re: Interfacing Cljs with external libs.

2011-08-06 Thread Alen Ribic
environment.  You should be able to grab it via js/Showdown and do all kinds of interopey things to it.  On Aug 5, 2011 4:27 PM, Alen Ribic alen.ri...@gmail.com wrote: Thanks Fogus for clearing that up. Would a call to a constructor function in a namespace of a third-party library

Re: Interfacing Cljs with external libs.

2011-08-05 Thread Alen Ribic
Currently, you can wrap the JS call in js* like so (js* MyLib.doSomething(arg1,arg2)). So this will pass the compile time without resolving the external lib calls. It is worth noting that you may come across an interesting problem that I did in similar scenario to yours. If you set the

Re: Downloadable ClojureScript demo?

2011-08-05 Thread Alen Ribic
When you download ClojureScript from github have a look at the /samples directory. There is a nice Tweetbuzz sample app. -Alen Sent from my iPhone On 05 Aug 2011, at 6:39 PM, Base basselh...@gmail.com wrote: Hi All - When I was getting started with Clojure the labrepl was SO helpful.

Re: Interfacing Cljs with external libs.

2011-08-05 Thread Alen Ribic
4:27 PM, Alen Ribic alen.ri...@gmail.com wrote: Thanks Fogus for clearing that up. Would a call to a constructor function in a namespace of a third-party library be an exception for the time being? (I can't seem to see a clear way you can express that via `js` namespace.) Example

Re: Problem calling third-party library from ClojureScript code when advanced optimization used

2011-08-03 Thread Alen Ribic
, philosophy is what you don't know. -- Bertrand Russell On Aug 2, 4:18 pm, Alen Ribic alen.ri...@gmail.com wrote: I have the following function in my cljs that is bound to a click event. It makes a call to an external library via js* as seen in the last body form of the preview function. (defn

Re: Including additional js in clojurescript compilation

2011-08-02 Thread Alen Ribic
Any Google Closure compliant JavaScript can be pulled into the build process by using the :libs option. Is there any information/resource on what makes the Javascript library Google Closure compliant? I have a third-party library that I have included via {:libs []} option, however it doesn't

Problem calling third-party library from ClojureScript code when advanced optimization used

2011-08-02 Thread Alen Ribic
I have the following function in my cljs that is bound to a click event. It makes a call to an external library via js* as seen in the last body form of the preview function. (defn preview [] (let [body-el(dom/getElement body_id) preview-el (dom/getElement preview_pane)

Twitter: From Ruby On Rails To The JVM + Clojure at Twitter, the new kid on the block

2011-07-30 Thread Alen Ribic
I thought this would be an interesting video to share with those who haven't seen it yet. Raffi Krikorian, the head of the Application Services Group at Twitter, talks about the move from Ruby on Rails to the JVM. He also briefly talks about running Clojure at Twitter, the new kid on the block.

Re: cljs-devmode - A development mode for ClojureScript

2011-07-27 Thread Alen Ribic
Thanks Max. This is wonderful. I can throw my current hack-job out the window. -Alen PS. Should I encounter any issues, I'll post them via github. On Jul 27, 12:31 pm, Max Weber mm.we...@web.de wrote: Hello everyone, I like to introduce you to cljs-devmode, which is a development mode for

Re: Alright, fess up, who's unhappy with clojurescript?

2011-07-25 Thread Alen Ribic
In the middle of what? I look at ClojureScript code and it looks like Clojure to me. Google Closure is under, and it is no more annoying there than Java is under Clojure - an implementation detail, and a rich source of production-quality code. I respectfully dispute that; for what they

Forcing evaluation of returned anonymous javascript function in ClojureScript

2011-07-24 Thread Alen Ribic
Firstly, thank you Clojure/core team and other contributors for this exciting project. I have a small problem I've encountered while building a simple personal blog, as an exercise, with Clojure/ClojureScript and would appreciate any feedback. I have a client-side function that sends a request

Re: Forcing evaluation of returned anonymous javascript function in ClojureScript

2011-07-24 Thread Alen Ribic
On Sun, Jul 24, 2011 at 1:51 PM, Alen Ribic alen.ri...@gmail.com wrote: Firstly, thank you Clojure/core team and other contributors for this exciting project. I have a small problem I've encountered while building a simple personal blog, as an exercise, with Clojure/ClojureScript

Re: Anyone on Google+ yet?

2011-07-24 Thread Alen Ribic
https://plus.google.com/118362877851205553020/posts -Al On Jul 14, 7:12 pm, Claudia Doppioslash claudia.doppiosl...@gmail.com wrote: My Clojure circle is all set up but empty. My g+ is:http://gplus.to/gattoclaudia Please add link to your profile below. -- You received this message because

Java 7 is adding dynamics

2010-04-09 Thread Alen Ribic
the performances of Java reflection and mainly the performances of the others languages that run in the JVM. On the surface, sounds like something Clojure core implementation could leverage in the long run. -Alen Ribic -- You received this message because you are subscribed to the Google Groups

Re: Clojure on Ideone!

2010-01-18 Thread Alen Ribic
I've been toying around something similar. Here is a rough preview: http://preview.xpojure.com/snippet/view/2/ -Alen On Mon, Jan 18, 2010 at 1:02 PM, Steve Purcell st...@sanityinc.com wrote: For those who didn't click through, this is a really nifty code paste site that will actually run

Re: memcached client

2009-09-30 Thread Alen Ribic
I've personally found using the spymemcached through java introp extremely easy, (def mc (MemcachedClient. (list (InetSocketAddress. 127.0.0.1 1211 (.. mc (set topic:1 3600 topic)) (.. mc (get topic:1)) (.. mc (getBulk coll)) etc. Perhaps a simple macro wrappers to encapsulate some common

Re: memcached client

2009-09-30 Thread Alen Ribic
at 3:07 PM, Alen Ribic alen.ri...@gmail.com wrote: I've personally found using the spymemcached through java introp extremely easy, (def mc (MemcachedClient. (list (InetSocketAddress. 127.0.0.1 1211 (.. mc (set topic:1 3600 topic)) (.. mc (get topic:1)) (.. mc (getBulk coll)) etc

Re: Spring and Clojure

2009-06-03 Thread Alen Ribic
This link might help. Came across this weblog titled Practical Clojure with SWT, JUnit and Spring: http://berlinbrowndev.blogspot.com/2009/04/practical-clojure-with-swt-junit-and.html -Al On Wed, Jun 3, 2009 at 6:02 PM, Dmitriy Kopylenko dmitriy.kopyle...@gmail.com wrote: Hello. I'm just

Re: Clojure Book example that has unexpected effect in trunk version of Clojure

2009-06-01 Thread Alen Ribic
Thanks Mark. I can confirm that the slime function slime-redirect-inferior-output fixed the problem. Now I see the expected output from the new thread within the same slime buffer. -Alen On Sun, May 31, 2009 at 9:28 PM, Stephen C. Gilardi squee...@mac.com wrote: On May 31, 2009, at 1:00 PM,

Re: Clojure Book example that has unexpected effect in trunk version of Clojure

2009-06-01 Thread Alen Ribic
For compile errors, all I see is the Stack trace in a new buffer and then when I hit 0, I'm back in my slime-repl buffer as usual. On Mon, Jun 1, 2009 at 10:19 AM, Mark Engelberg mark.engelb...@gmail.com wrote: What happens to compile errors once you make that change.  Do they end up in the

Clojure Book example that has unexpected effect in trunk version of Clojure

2009-05-31 Thread Alen Ribic
I am currently reading the Programming Clojure book and have come across an unexpected result for an example in section titled Managing Per-thread state with Vars. Code snippet is as follows (with expected result): user (def foo 10) #'user/foo user= (.start (Thread. (fn [] (println foo nil

Re: Clojure Book example that has unexpected effect in trunk version of Clojure

2009-05-31 Thread Alen Ribic
: Clojure 1.1.0-alpha-SNAPSHOT user= (def foo 10) #'user/foo user= (.start (Thread. (fn [] (println foo nil 10 It also worked on whatever I was using before that. Can you confirm you are experiencing this behaviour in 1382? On May 31, 6:59 pm, Alen Ribic alen.ri...@gmail.com wrote: I

Re: clojure-mode install on Windows XP does not work, for me

2009-05-21 Thread Alen Ribic
Thanks this also worked for me on my Aquamacs Clojure slime setup. I added your code to the customization.el file in ~/Library/ Preferences/... -Alen On May 18, 7:14 pm, Paul Stadig p...@stadig.name wrote: I just happened to be setting up emacs an a new Ubuntu install today. I think it might