Re: aot compilation: minimise the scope of the resulting classes

2012-05-22 Thread Philip Aston
On Tuesday, May 22, 2012 6:06:21 PM UTC+1, Hugo Duncan wrote: > > Phil Hagelberg writes: > > One solution is to call require at runtime inside function bodies > > rather than at the top-level. Then to call the functions from the > > runtime-required namespace, use the resolve function. > > Anot

[ANN] clojure-echonest-api

2012-05-22 Thread Simone Mosciatti
Hi everybody, I have release a library to query the echonest[1][2] API. This is my very first job so I'm looking for feedback, especially about how to manage some basic configuration[3] and how introduce asynchronously agent[4]... I am very happy to have finished this job... Please contact me

ANN Welle 1.0 final

2012-05-22 Thread Michael Klishin
Welle RC1 was announced here about a week ago [1], so this will be a short one. No issues have been found since 1.0.0-RC1 and documentation guides at http://clojureriak.info are now complete, so it's time to release Welle 1.0.0 final. Change log: https://github.com/michaelklishin/welle/blob/mast

Re: aot compilation: minimise the scope of the resulting classes

2012-05-22 Thread Hugo Duncan
Phil Hagelberg writes: > On Mon, May 21, 2012 at 10:56 AM, Philip Aston wrote: >> I'd like to compile the bare minimum, even if this means some sort of >> thunk in Bootstrap. How can I do this? > > One solution is to call require at runtime inside function bodies > rather than at the top-level.

Re: aot compilation: minimise the scope of the resulting classes

2012-05-22 Thread Phil Hagelberg
On Mon, May 21, 2012 at 10:56 AM, Philip Aston wrote: > I'm using lein2 to aot compile a namespace than generates a Java > "Bootstrap" class. Bootstrap implements an interface and delegates > calls to other namespaces. > > For some reason, the resulting jar file includes compiled classes for > the

Re: defrecord with "inheritance"

2012-05-22 Thread Warren Lynn
Maybe some macros can help. But if it is a good and common pattern, then it should be included as part of the the language. One thing I am glad to see in Clojure is it absorbed some known good macros in Common Lisp (like "awhen" becomes "when-let") so people don't need to re- invent the wheels agai

Re: defrecord with "inheritance"

2012-05-22 Thread Warren Lynn
Seems to me an approach like this requires too much manual work. If I know Employee have all the data fields of Person, then I know all functions working on Person will work on Employee. That is clear and simple. In my view, in our programming work, maybe 80% or more time are spent on simple thing

Re: [ANN] checkero 0.1.0 : A Clojure code similarity search tool

2012-05-22 Thread Arnoldo Muller
Hi Sean, It does not have a wikipedia page. It is based on the following paper: http://www.springerlink.com/content/23072603g83224v5/ The docs are a bit sparse so if you have questions do not hesitate to ask :) Regards, AM. On Tuesday, May 22, 2012 9:47:49 AM UTC-6, Sean Neilan wrote: > >

Re: [ANN] checkero 0.1.0 : A Clojure code similarity search tool

2012-05-22 Thread Sean Neilan
Just curious, what is the name of the tree distance function and does it have a wikipedia page? Very, very cool! On May 22, 2012, at 12:36 AM, Arnoldo Muller wrote: Checkero finds common Clojure source code inside a set of directories. It is primarily intended to study how Clojure learners writ

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread D.Bushenko
David, I have just tried hosting index.html, main.js and out/ under tomcat7/webapps/my/ directory, executed the cljs repl, navigated to localhost:8080/my/index.html, and it worked! Thanks, that was very helpful! Dmitry P.S. I think, the note about hosting index.html on some kind of webserver

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread David Nolen
Loading the file directly in your browser will not work. The Closure transport we use does not support that anymore. David On Tue, May 22, 2012 at 10:40 AM, D.Bushenko wrote: > Hey guys, > > Something is going totally wrong in the project samples/repl. This is OK > that navigating to localhost:

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread D.Bushenko
Hey guys, Something is going totally wrong in the project samples/repl. This is OK that navigating to localhost:9000 wakes up the repl. But there is a file index.html which loads the compiled src/repl/test.cljs. As the test.cljs file contains the code (repl/connect "http://localhost:9000/repl"

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread David Nolen
The README.md was up-to-date. test.cljs is now also up-to-date in master. On Tue, May 22, 2012 at 10:26 AM, Raju Bitter wrote: > Ok, you mean if you open the HTML page from disk, the REPL is not > working for you. I can confirm that. > > > There are conflicting instructions in the test.cljs file,

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread D.Bushenko
Raju, This is great that you have found the problem! But is there a way I can connect a REPL to my web-page? What should I do for that? Do I need to load the page through the request to the web-server? Dmitry вторник, 22 мая 2012 г., 17:26:37 UTC+3 пользователь Raju Bitter написал: > > Ok, you

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread Raju Bitter
Ok, you mean if you open the HTML page from disk, the REPL is not working for you. I can confirm that. There are conflicting instructions in the test.cljs file, and in the README.md https://github.com/clojure/clojurescript/blob/master/samples/repl/src/repl/test.cljs " ;; Open the file samples/rep

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread D.Bushenko
The browser is opened and the test page is loaded (after the repl is started). This is the most weird bcs it should work. At least if I navigate to localhost:9000 it works pretty well. вторник, 22 мая 2012 г., 16:55:06 UTC+3 пользователь Raju Bitter написал: > > Dimitry, > > are you trying to e

Re: Core.logic, dynamically generated goals

2012-05-22 Thread Alex Robbins
Good to think about. Thanks Brian. On Sun, May 20, 2012 at 5:44 PM, Brian Marick wrote: > > On May 19, 2012, at 1:12 PM, Alex Robbins wrote: > >> Is it possible to use dynamically generated goals in run* ? > > You might want to think macros. I have written macros that tweak `run` bodies > for va

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread Raju Bitter
Dimitry, are you trying to evaluate the expressinon (+ 1 1) with the browser window closed? That's not going to work! With the browser-connected REPL, the browser JS engine is used to evaluate the JavaScript. If you don't use the browser-connected REPL, ClojureScript will use the embedded Rhino J

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread D.Bushenko
Raju, That's correct, I'm talking about the project https://github.com/clojure/clojurescript/tree/master/samples/repl . Dmitry вторник, 22 мая 2012 г., 16:51:16 UTC+3 пользователь Raju Bitter написал: > > Pierre-Henry, > > I think you are referring to the ClojureScript One tutorial? > http://

Re: Lexer and parser generator in Clojure

2012-05-22 Thread Lukas Domagala
you could try https://github.com/Cyrik/clparsec . i´m still working on an alpha release, but it already has all the basic parsec operators -- 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 No

Application monitoring with Netty?

2012-05-22 Thread Jeroen van Dijk
Hi all, I'm planning to deploy an app on Heroku that exploits some features of Aleph (e.g. streaming responses). Coming from the Ruby world I've been spoiled with all the application metrics that NewRelic provides. For Clojure, however, they currently only support Jetty based apps. Does anyone kno

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread Raju Bitter
Pierre-Henry, I think you are referring to the ClojureScript One tutorial? http://clojurescriptone.com/getting-started.html The commands listed there will only work with ClojureScript One, not with the ClojureScript examples in Git. Dimitry is trying to get the browser-connected REPL in the Cloju

Re: defrecord with "inheritance"

2012-05-22 Thread David Nolen
On Tue, May 22, 2012 at 8:29 AM, nicolas.o...@gmail.com < nicolas.o...@gmail.com> wrote:>> > > Why should most extensions manipulate mutable fields? > > > Most certainly won't. Now none of them can. Good :) -- You received this message because you are subscribed to the Google Groups "Clojure"

Re: defrecord with "inheritance"

2012-05-22 Thread nicolas.o...@gmail.com
> > Access internal state? >> Like __hash in your code. >> For example, the earlier hash example cannot be put as an extension. > > Why should most extensions manipulate mutable fields? > Most certainly won't. Now none of them can. -- You received this message because you are subscribed to the

Re: defrecord with "inheritance"

2012-05-22 Thread David Nolen
On Tue, May 22, 2012 at 8:04 AM, nicolas.o...@gmail.com < nicolas.o...@gmail.com> wrote: > And then you need to include everything accessing the internal state of > your data structures in a big deftype with little possibility of reuse. Access internal state? > For example, the earlier hash exa

Re: defrecord with "inheritance"

2012-05-22 Thread nicolas.o...@gmail.com
> The only exception is mutable fields in the type where you don't want uncontrolled access. There you indeed need a protocol to handle the synchronisation of the field access. > > And then you need to include everything accessing the internal state of your data structures in a big deftype with lit

Re: defrecord with "inheritance"

2012-05-22 Thread David Nolen
It sounds like you have issue with working with something as low level as deftype not with protocols nor how they are intended to be used. Most people don't need to bother with equivalence or lookup - they have defrecord. On Monday, May 21, 2012, Mark Engelberg wrote: > On Mon, May 21, 2012 at 4:

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread D.Bushenko
This is the README.md shipped with the clojurescript/samples/repl project. I also tried the steps from the comments to the clojurescript/samples/repl/src/repl/test.cljs -- the same result. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to t

Re: defrecord with "inheritance"

2012-05-22 Thread Meikel Brandmeyer (kotarak)
Hi, Am Dienstag, 22. Mai 2012 09:01:31 UTC+2 schrieb Nicolas Oury: > > > I think the whole thread is about the trade-off: some people complains > that deftype lacks features. > It's not about trade-offs. It's about deftype seemingly lacking features. > Another problem with extend is that you

Re: defrecord with "inheritance"

2012-05-22 Thread Softaddicts
My strategy here would be different, the conversion fn would be part of the cell attributes. Maybe with the help of a lightweight factory fn to ease record allocation. The Convertable protocol would simply refer to the closure attribute, call it and pass this as the unique parameter. The reasons

Re: defrecord with "inheritance"

2012-05-22 Thread David Nolen
Field access works just fine with extend. On Tuesday, May 22, 2012, nicolas.o...@gmail.com wrote: > > Everyone just reiterates the mantra “It's slower! It's slower! It's > > slower!”, but no one talks about the trade-offs. And I bet only a very > > small fraction ever checked what “slower” means

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread David Nolen
Which README.md? Might have missed updating one. Thanks On Tuesday, May 22, 2012, Дмитрий Бушенко wrote: > No, I didn't try that since it wasn't in the README.md file. I thought the > steps described in the readme should be sufficient to run the repl, isn't > it? > > 2012/5/22 Pierre-Henry Perre

Re: defrecord with "inheritance"

2012-05-22 Thread Softaddicts
Bad copy & paste, forgot to remove age from the Personable def. > On May 22, 2012 7:09 AM, "Softaddicts" wrote: > > A better way would be something like: > > > > (defprotocol Personable > >(person [this]) > > (age [this] ) > > > > (defprotocol CensusOperators > >(age [this])) > > > >

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread D.Bushenko
No, it doesn't. That's why I'm here looking for help. -- 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 Note that posts from new members are moderated - please be patient with your first pos

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread Pierre Henry Perret
Right, just follow that, it should work. -- Pierre 2012/5/22 Дмитрий Бушенко > No, I didn't try that since it wasn't in the README.md file. I thought the > steps described in the readme should be sufficient to run the repl, isn't > it? > > > 2012/5/22 Pierre-Henry Perret > >> Hoops -> Ha

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread Дмитрий Бушенко
No, I didn't try that since it wasn't in the README.md file. I thought the steps described in the readme should be sufficient to run the repl, isn't it? 2012/5/22 Pierre-Henry Perret > Hoops -> Have you started the dev server ? repl > (dev-server) ? > > Le mardi 22 mai 2012 10:29:00 UTC+2,

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread Pierre-Henry Perret
Hoops -> Have you started the dev server ? repl > (dev-server) ? Le mardi 22 mai 2012 10:29:00 UTC+2, D.Bushenko a écrit : > > I have just tried http://localhost:8080/development as well as > http://localhost:9000/development -- > nothing happens. The se

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread Дмитрий Бушенко
I have just tried http://localhost:8080/development as well as http://localhost:9000/development -- nothing happens. The server doesn't respond to the first URI at all, the second URI just doesn't exist. 2012/5/22 Pierre Henry Perret > Hi Dimitry, > > Have yo

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread Pierre Henry Perret
Hi Dimitry, Have you tried http://localhost:8080/development ? -- Pierre 2012/5/22 D.Bushenko > Hi all, > > I'm trying to run clojurescript repl connected to browser and have failed > in all my attempts. I'm running the "clojurescript/samples/repl" project > provided with the clojurescript

Re: New release of Domina (now with reworked eventing)

2012-05-22 Thread Dmitry Groshev
cljsbuild still screams on me when building Domina with the latest Clojurescript and cljsbuild. WARNING: Use of undeclared Var domina/.DomContent at line 459 /home/si14/repos/domina/src/cljs/domina.cljs WARNING: Use of undeclared Var domina/.nodes at line 459 /home/si14/repos/domina/src/cljs/do

compile: produce a java class with minimum linkage to other clojrue code

2012-05-22 Thread Philip Aston
Hello, I'm aot compiling a namespace with lein2 to produce a Java class that is (:gen-class :name blah.Bootstrap :implements [some.java.Interface] :prefix bootstrap- )) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this grou

aot compilation: minimise the scope of the resulting classes

2012-05-22 Thread Philip Aston
I'm using lein2 to aot compile a namespace than generates a Java "Bootstrap" class. Bootstrap implements an interface and delegates calls to other namespaces. For some reason, the resulting jar file includes compiled classes for the delegate namespaces, and many of their transitive dependencies.

Can't start clojurescript browser-connected repl

2012-05-22 Thread D.Bushenko
Hi all, I'm trying to run clojurescript repl connected to browser and have failed in all my attempts. I'm running the "clojurescript/samples/repl" project provided with the clojurescript distribution. I'm following the README.md step by step and doing the following: dim@tarantoga:~/clojure/clo

Re: defrecord with "inheritance"

2012-05-22 Thread nicolas.o...@gmail.com
> Everyone just reiterates the mantra “It's slower! It's slower! It's > slower!”, but no one talks about the trade-offs. And I bet only a very > small fraction ever checked what “slower” means in their specific use > case. I think the whole thread is about the trade-off: some people complains that