[ANN]First toy-project : CYASUS

2012-11-26 Thread Fabien Bourgeois
Good morning ! New at once to : - Clojure - functional programming - JVM and Java ecosystem - GIT I've decided to start quietly with a micro-project : a very original URL shortener. Its name is CYASUS (for Clojure Yet Another Stupid URL Shortener) and you can find it at

Re: Clojure/ClojureScript Spotting

2012-11-26 Thread blackblock
would be cool, except it fails to run on Java 7 on Ubuntu, and why did they choose to deploy it as heavy WebStart app ? Why not use pure Clojurescript + websockets + C2/WebGL ? On Tuesday, November 27, 2012 12:58:42 PM UTC+11, Baishampayan Ghose wrote: > > Hi, > > I was checking out the new GoPa

Re: Current status of Clojure on Android?

2012-11-26 Thread Herwig Hochleitner
2012/11/26 John Gabriele > What are currently the main limitations in creating and running > Clojure programs on Android? (Does some limited subset of Clojure > work? Does the bytecode that Clojure produces run on Dalvik?) > Clojure on Android is alive and well as far as I'm aware. I'm not curre

Re: Clojure/ClojureScript Spotting

2012-11-26 Thread David Nolen
WOW! Awesome :) David On Mon, Nov 26, 2012 at 8:58 PM, Baishampayan Ghose wrote: > Hi, > > I was checking out the new GoPanda2 client for IGS (Internet Go Server) > and I was pleasantly surprised to discover that the app is actually written > in Clojure & ClojureScript - > > http://www.pandanet

Clojure/ClojureScript Spotting

2012-11-26 Thread Baishampayan Ghose
Hi, I was checking out the new GoPanda2 client for IGS (Internet Go Server) and I was pleasantly surprised to discover that the app is actually written in Clojure & ClojureScript - http://www.pandanet-igs.com/communities/gopanda/100/ They don't mention Clojure anywhere, but it's quite easy to fi

Re: Promise for ClojureScript?

2012-11-26 Thread Frank Siebenlist
I've been following the separate discussion-thread about your enhanced Promise effort, and it looks really cool and very useful. Having that also available (next week ;-) ) in clojurescript would be fantastic! -FS. On Nov 26, 2012, at 5:32 PM, Stuart Sierra wrote: > I've been working on a pr

Re: Promise for ClojureScript?

2012-11-26 Thread Frank Siebenlist
Thanks for the pointers! The only issue is that all code refers to node and not the browser's js… :-( Your blocking-deref seems to rely on node/process.nextTick to essentially poll in every event-loop-cycle. Is there any node/process.nextTick equivalent that can be used in the browser? (that se

Re: Docs on standard protocols

2012-11-26 Thread Stuart Sierra
Unfortunately, I am not aware of any comprehensive documentation for the internal Java implementation of Clojure's core data types. The source code is the only definitive resource. Introspection can help. For example, to get a list of everything you need to implement to support map-like behavio

Re: Promise for ClojureScript?

2012-11-26 Thread Stuart Sierra
I've been working on a promises API with callbacks for Clojure (JVM): http://dev.clojure.org/display/design/Promises If I can get buy-in and support for implementing this as a language-level feature in Clojure, the obvious next step would be to port it to ClojureScript. -S -- You received thi

Re: Promise for ClojureScript?

2012-11-26 Thread David Nolen
Another interesting approach would be real compiler support for promises so we can get something closer to Clojure JVM semantics. This would require someone to get a bit more serious about the CLJS AST and related infrastructure for pluggable passes. David On Mon, Nov 26, 2012 at 6:51 PM, Frank

Re: Promise for ClojureScript?

2012-11-26 Thread Paul deGrandis
Hi Frank, I have a discussion about promises in CLJS using Closure's Result: http://www.pauldee.org/blog/2012/clojurescript-and-node-js-an-experience-report/ Bodil is also working on the underpinnings of a proper CLJS promise (potentially specific to Node.js): https://github.com/bodil/redlobster

Promise for ClojureScript?

2012-11-26 Thread Frank Siebenlist
All this call-back stuff drives me crazy in ClojureScript&JS… Unfortunately we do not have a "real" cljs promise yet. There seem to be javascript constructs that promise (pun intended) to do similar things - jQuery has some deferred and promise things. I have no experience with any of those jav

Docs on standard protocols

2012-11-26 Thread Dmitry Groshev
Is there any reference of standard protocols in which one can participate? When working with Java code and building bindings to complex Java classes, it's sometimes handy to define instances of Seq (for example) for them. But it's horribly troublesome to look up protocols in source code every ti

Re: seq? vs sequential? vs coll?

2012-11-26 Thread Sean Corfield
clojure.core.incubator: https://github.com/clojure/core.incubator/blob/master/src/main/clojure/clojure/core/incubator.clj#L77 On Mon, Nov 26, 2012 at 1:51 PM, Frank Siebenlist < frank.siebenl...@gmail.com> wrote: > Guess we need a test for "seq'able" ;-) > > -FS. > > > On Nov 26, 2012, at 1:47 P

Re: help choosing dev environment for clojure

2012-11-26 Thread Sol Tourne
> You could consider lighttable  I have tried it, and liked much of it, but it doesn't (or at least didn't) have anything like a debugger allowing one to step through the execution (and poke around in intermediate stage of the computation)... -- You received this message because you are subs

Re: help choosing dev environment for clojure

2012-11-26 Thread Sol Tourne
> In your list, the only thing you won't be able to do with Eclipse is > executing clojure forms in the context of the breakpoint.  Thanks, that's very useful info.  Is that doable in emacs? (ie 'executing clojure forms in the context of the breakpoint'.) The answers so far emphasize emacs'

Re: cljs: dynamic/reflective calls

2012-11-26 Thread Karl Krukow
Ah :) Cheers, - Karl On 26/11/2012, at 23.03, David Nolen wrote: > You can use `aget` for that. > > (aget object "someProperty") > > David > > > On Mon, Nov 26, 2012 at 5:00 PM, Krukow wrote: > Continuing my exploration of ClojureScript.. I'm writing a small query > language. The syntax con

Re: cljs: dynamic/reflective calls

2012-11-26 Thread David Nolen
You can use `aget` for that. (aget object "someProperty") David On Mon, Nov 26, 2012 at 5:00 PM, Krukow wrote: > Continuing my exploration of ClojureScript.. I'm writing a small query > language. The syntax consists of data structures like > > [:button {:name "Login"}] > > In general maps are

Re: cljs: extend-protocol to Keyword

2012-11-26 Thread David Nolen
We can collect all symbol/keyword literals during analysis - we can emit a static symbol/keyword table at the top and replace with direct identifiers when we compile. We can change the symbols/keyword fn to create symbol/keyword instances and intern them in a runtime table (the static table will be

cljs: dynamic/reflective calls

2012-11-26 Thread Krukow
Continuing my exploration of ClojureScript.. I'm writing a small query language. The syntax consists of data structures like [:button {:name "Login"}] In general maps are interpreted as filters. The keys of the maps correspond to method on JavaScript objects (that I don't control). So I want

Re: cljs: extend-protocol to Keyword

2012-11-26 Thread Krukow
Thanks both for the responses. I'm extending to string for now, which is fine for my usecase. - Karl On Monday, November 26, 2012 9:28:06 PM UTC+1, Krukow wrote: > > Hi, > I'm writing my first ClojureScript program. I defined a protocol for a > query language which I wanted to extend to various

Re: seq? vs sequential? vs coll?

2012-11-26 Thread Frank Siebenlist
Guess we need a test for "seq'able" ;-) -FS. On Nov 26, 2012, at 1:47 PM, Herwig Hochleitner wrote: > 2012/11/26 Philip Potter > > Since ISeq already is a seq and IPersistentCollection derives from Sequable, > > both will succeed in a seq call. > > A Seqable isn't necessarily a seq: > > Did

Re: seq? vs sequential? vs coll?

2012-11-26 Thread Herwig Hochleitner
2012/11/26 Philip Potter > > Since ISeq already is a seq and IPersistentCollection derives from > Sequable, > > both will succeed in a seq call. > > A Seqable isn't necessarily a seq: > Didn't say that, but Sequable defines the .seq() method, so it will succeed in a seq call. -- You received

Re: cljs: extend-protocol to Keyword

2012-11-26 Thread Herwig Hochleitner
2012/11/26 David Nolen > keywords & symbols as proper types is probably not far off and optimizing > them doesn't need to wait for a general whole program optimization strategy. > > Certainly, gclosure can't generally eliminate the check in: var mykw = kw_table[kw_str] || (kw_table[kw_str] = new

Current status of Clojure on Android?

2012-11-26 Thread John Gabriele
Hi, What is the current status of Clojure on Android? That is, for creating Android apps in Clojure. I found this http://dev.clojure.org/display/design/Android+Support , but it appears to have been last-updated Feb 2011. What are currently the main limitations in creating and running Clojure pro

Re: import blah.*

2012-11-26 Thread vemv
Thanks for the answer Herwig! swank-clojure and nrepl(.el) can do pretty amazing things. But in my opinion, at least in the context of Java interop there is still work left to do... Lastly, as of today, what can clojurescript do that clojure can't? On Saturday, November 24, 2012 11:36:50 PM UT

Re: seq? vs sequential? vs coll?

2012-11-26 Thread Philip Potter
On 26 November 2012 21:11, Herwig Hochleitner wrote: > seq?, sequential? and coll? are the predicates for ISeq, Sequential and > IPersistentCollection, respectively. > > Sequential is just a marker interface which doesn't promise anything but a > defined order of elements. > Since ISeq already is

Re: seq? vs sequential? vs coll?

2012-11-26 Thread Herwig Hochleitner
seq?, sequential? and coll? are the predicates for ISeq, Sequential and IPersistentCollection, respectively. Sequential is just a marker interface which doesn't promise anything but a defined order of elements. Since ISeq already is a seq and IPersistentCollection derives from Sequable, both will

Re: cljs: extend-protocol to Keyword

2012-11-26 Thread David Nolen
keywords & symbols as proper types is probably not far off and optimizing them doesn't need to wait for a general whole program optimization strategy. David On Mon, Nov 26, 2012 at 3:42 PM, Herwig Hochleitner wrote: > Encoding Keywords as Strings is a performance optimization in > clojurescript

Re: cljs: extend-protocol to Keyword

2012-11-26 Thread Herwig Hochleitner
Encoding Keywords as Strings is a performance optimization in clojurescript. js/String is in fact extended to IFn to make it work https://github.com/clojure/clojurescript/blob/master/src/cljs/cljs/core.cljs#L1795 I don't think it is an immutable design choice, but a replacement with interned Keywo

Re: Closure Accordion Widget

2012-11-26 Thread ckirkendall
It would also be trivial to use enfocus' resize functionality to implement a pure clojurescript one. I am planning on building a set of UI tools like accordion data tables, and tabs for enfocus. Enfocus supports quite a few base level animations. If you would like I might be able to through

cljs: extend-protocol to Keyword

2012-11-26 Thread Krukow
Hi, I'm writing my first ClojureScript program. I defined a protocol for a query language which I wanted to extend to various data types, including keywords. However keywords are strings when it comes to dispatch. Is this a bug, or by design? ClojureScript:cljs.user> (defprotocol Foo (-a [x] "

Re: seq? vs sequential? vs coll?

2012-11-26 Thread Sean Corfield
A colleague showed me this page recently which seems like a nice quick reference: http://www.brainonfire.net/files/seqs-and-colls/main.html On Mon, Nov 26, 2012 at 6:01 AM, Mark Engelberg wrote: > I understand that these functions test for different interfaces, but I > don't have a clear sense

Re: Closure Accordion Widget

2012-11-26 Thread Jordan Berg
If you do decide you are interested in a non-Jquery solution, I think that you could probably combine a few animated zippys[1] to get the same functionality as an accordion with a little additional CLJS code. [1] http://closure-library.googlecode.com/svn/docs/class_goog_ui_AnimatedZippy.html On

Re: Closure Accordion Widget

2012-11-26 Thread Aaron Cohen
I've only used it at a very shallow level, but https://developers.google.com/closure/library/docs/overview has seemed quite nice to me? On Sat, Nov 24, 2012 at 7:14 PM, Jonathan Fischer Friberg < odysso...@gmail.com> wrote: > I don't think there's a consensus. > You will have to weigh the pros/c

Re: Using a dynamic number of lvars in core.logic.

2012-11-26 Thread David Nolen
`gensym` doesn't create logic vars, `lvar` does. Use `lvar` not `gensym`. David On Mon, Nov 26, 2012 at 12:48 PM, Frederik De Bleser wrote: > Hey David, > > I don't quite understand how I would apply your suggestion this with my > example. > > 1. So the "all" function creates a choice point. H

Re: Using a dynamic number of lvars in core.logic.

2012-11-26 Thread Frederik De Bleser
Hey David, I don't quite understand how I would apply your suggestion this with my example. 1. So the "all" function creates a choice point. How do I create lvars? I tried: (run* [q] (let [vars (repeatedly 3 #(gensym 'x))] (all (== q vars ;=> ((x4388 x4389 x4390)) Shouldn't I

Re: [ANN] sublime-lispindent, clojure indenting for sublime text 2

2012-11-26 Thread Jonathan Fischer Friberg
lispindent has been uploaded to the sublime package control! I have updated the readme accordingly. It's probably best to remove the old package before installing the new one. I also changed the code to work better when installing. It should basically be possible to install it and immediately star

Re: Using a dynamic number of lvars in core.logic.

2012-11-26 Thread David Nolen
You can do something like the following: (run [q] (let [vars (repeatedly some-n lvar)] (all (== q vars functional programming FTW ;) David On Mon, Nov 26, 2012 at 10:22 AM, Frederik De Bleser wrote: > Using core.logic, I sometimes have the need to create a variable number of

Using a dynamic number of lvars in core.logic.

2012-11-26 Thread Frederik De Bleser
Using core.logic, I sometimes have the need to create a variable number of fresh lvars. For example, I want to create all possible combinations of "n" numbers between "min" and "max". Currently the only way I found how to do this was building the expression and evalling it: (defn generate-symb

Re: seq? vs sequential? vs coll?

2012-11-26 Thread Jim foo.bar
Ooops!!! No, Mark asked this in his first post... sorry for the confusion! Jim On 26/11/12 14:31, Philip Potter wrote: On 26 November 2012 14:27, Jim foo.bar wrote: On 26/11/12 14:19, Philip Potter wrote: Has anyone compiled a little table of what things satisfy which predicates? I don't

Re: seq? vs sequential? vs coll?

2012-11-26 Thread Philip Potter
On 26 November 2012 14:27, Jim foo.bar wrote: > On 26/11/12 14:19, Philip Potter wrote: >> >> Has anyone compiled a little table of what things satisfy which >> predicates? I don't think I wrote this. -- You received this message because you are subscribed to the Google Groups "Clojure" group.

Re: seq? vs sequential? vs coll?

2012-11-26 Thread Philip Potter
And to answer your original question, ISeq extends IPersistentCollection, so all seq? should be coll?. I *think* all concrete ISeqs are Sequential in practice, and all Sequentials are IPersistentCollections, but I'm not 100%. Phil On 26 November 2012 14:01, Mark Engelberg wrote: > I understand

Re: seq? vs sequential? vs coll?

2012-11-26 Thread Jim foo.bar
On 26/11/12 14:19, Philip Potter wrote: Has anyone compiled a little table of what things satisfy which predicates? I'm not 100% sure, but I think "Clojure Programming " has a table like this...I can confirm as soon as I get back home... Jim -- You received this message because you are subs

Re: seq? vs sequential? vs coll?

2012-11-26 Thread Philip Potter
I think seq? and coll? are pretty self-explanatory - they test if it is a valid seq or collection respectively. Sequential seems to be an equality partition of some sort -- ie two Sequentials with the same contents in the same order should compare equal -- but in my view if you ever have a Sequent

Re: seq? vs sequential? vs coll?

2012-11-26 Thread Jim foo.bar
My understanding is that everything (all data-structures) is coll? (obviously not strings) lists and vectors are sequential? (and coll?) sets are only coll? maps are map? (and coll?) All seq? are sequential? Yes and also coll? All sequential? are coll? Well yeah but not only...all persisten

Bestcase -- A/B Testing Library for Clojure

2012-11-26 Thread Jean-Denis Greze
Hi, I've just released Bestcase -- an easy-to-use A/B and multivariate testing library for Clojure [https://github.com/jeandenis/bestcase]. It's heavily influenced by A/Bingo for Rails. Its main features are: - create tests in one line of code -

seq? vs sequential? vs coll?

2012-11-26 Thread Mark Engelberg
I understand that these functions test for different interfaces, but I don't have a clear sense for which things respond differently to these predicates. Has anyone compiled a little table of what things satisfy which predicates? So far, I've figured out that although lists, strings, vectors, and

Re: help choosing dev environment for clojure

2012-11-26 Thread Ravindra Jaju
On Sun, Nov 25, 2012 at 11:08 PM, Laurent PETIT wrote: > My advice: don't try to learn too much at once. Eclipse+counterclockwise > (and probably Intellij+La Clojure) lets you start right away hacking > clojure. They are specifically designed to be newbie friendly Postpone > the decision of bec

Re: clojurescript: ex-info and ex-data

2012-11-26 Thread Dave Sann
added http://dev.clojure.org/jira/browse/CLJS-429 for now On Monday, 26 November 2012 04:57:39 UTC+11, David Nolen wrote: > > Agreed. Patches welcome! > > On Saturday, November 24, 2012, Dave Sann wrote: > >> Is there a plan to add these? >> >> It seems like a step towards more generic exception h

ritz + overtone

2012-11-26 Thread Catonano
Hello people, I managed to set up overtone and connecti it to a nrepl Now I need to debug and I discovered ritz Can I keep overtone and add the ritz debugging thing to the recipe ? How do I set it up ? Is it required to substitute the current nrepl with the one provided by ritz in order to deb

Re: help choosing dev environment for clojure

2012-11-26 Thread Frederik De Bleser
+ 1 for Light Table. The instarepl is a very useful tool for learning and exploring Clojure. F Op zondag 25 november 2012 22:00:36 UTC+1 schreef René Groß het volgende: > > You could consider lighttable by chris granger as well. It is at a very > early stage, but pretty much usable for hacking