Re: ANN: polyfn

2012-10-08 Thread Tassilo Horn
Paul Stadig writes: Hi Paul, thanks for the detailed answer. > A drawback with polyfns is there's no Java interface that can be > extended in Java code to participate in the dispatch. At least currently I don't see a use-case where I'd need to do that. >> One minor problem I have with the pro

Re: lein run deadlocking?

2012-10-08 Thread Brian Craft
It's something to do with gloss.io. This is enough to cause the deadlock: (ns downsample.core (:require [gloss.io]) (:gen-class)) (defn -main "I don't do a whole lot ... yet." [& args] (println "Hello, World!")) On Monday, October 8, 2012 6:37:57 PM UTC-7, Brian Craft wrote: > > Cent

Re: Slightly updated Clojure cheatsheet available

2012-10-08 Thread Andy Fingerhut
I haven't created an info format version of it, nor am I aware of anyone else who has. I have a Clojure program that starts from a data structure and generates LaTeX and HTML versions of the cheatsheet from that. It is available here: https://github.com/jafingerhut/clojure-cheatsheets/blob/mas

Re: Slightly updated Clojure cheatsheet available

2012-10-08 Thread Timothy Washington
This is great. Thanks very much. Tim On Mon, Oct 8, 2012 at 9:41 PM, Andy Fingerhut wrote: > http://jafingerhut.github.com > > The only changes since the previous version are to add a mention of > *unchecked-math*, and the following new symbols in Clojure 1.4 are now > mentioned. These 1.4-spe

Re: ANN: cronj - task scheduling

2012-10-08 Thread zcaudate
> > thanks! I'll make the change -- 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 post. To unsubscribe fr

Re: ANN clojure-doc.org (aka CDS), a new community-driven Clojure documentation site

2012-10-08 Thread Dave Della Costa
Hi John, regarding the backticks for code blocks, are you talking about using Markdown? It looks like because Jekyll uses the markdown parser Maruku (http://maruku.rubyforge.org/maruku.html), instead of the redcarpet that GFM uses, you'll have to use tildes instead of backticks. Dave (12/10

Re: ANN: cronj - task scheduling

2012-10-08 Thread Jim Crossley
Hi, Cool lib, but one minor correction: quartzite is backed by Quartz, which features a number of different scheduling mechanisms, including a unix-like CronExpression, but it's not a traditional crontab spec. In particular, it has an additional seconds field and a pretty handy "increment" operato

Re: ANN: polyfn

2012-10-08 Thread Frank Siebenlist
Interesting project, although I'm still a little unclear about the "convincing" use cases where you would choose polyfn over protocols... Also, how does the polyfn implementation compare to the clojurescript protocol implementation? -FrankS. On Oct 8, 2012, at 7:17 PM, Paul Stadig wrote: >

Re: Slightly updated Clojure cheatsheet available

2012-10-08 Thread Grant Rettke
On Mon, Oct 8, 2012 at 8:41 PM, Andy Fingerhut wrote: > The only changes since the previous version are to add a mention of > *unchecked-math*, and Nice! Is there one in Info format out there? I can't find it. -- You received this message because you are subscribed to the Google Groups "Clojur

Re: ANN: polyfn

2012-10-08 Thread Paul Stadig
On Monday, October 8, 2012 1:55:50 PM UTC-4, Tassilo Horn wrote: > > Paul Stadig > writes: > > Hi Paul, > > > I created a library for Clojure to do open, single dispatch > > polymorphism. What does this mean? > > > > * A polyfn dispatches on the type of its first argument. > > * You can add a

Re: ANN: a Clojure docs site, and github organization

2012-10-08 Thread Bill Robertson
Giant +1 to moving clojuredocs.org forward. I've been getting concerned about the longevity of the site, and I would really miss it if it were gone. On Thursday, October 4, 2012 4:35:33 PM UTC-4, Michael Klishin wrote: > > 2012/10/5 Bronsa > > >> Wouldn't it be better for readevalprintlove and cl

reading binary blob

2012-10-08 Thread Brian Craft
I need to parse some floats from a binary blob. The whole blob is floats, so the number of floats can be found from the blob size. Is gloss the best way to do it? Is there anything simpler? gloss doesn't seem to have a nice way to saying "read floats until you run out of bytes". I also couldn'

ANN: cronj - task scheduling

2012-10-08 Thread zcaudate
cronj This is another cron-inspired task-scheduling library. I have found many scheduling libraries for clojure: - quartzite - cron4j - clj-cronlike - at-at - monotony The first three all follow the cron convention. The "task" (also called a "job") can only be scheduled at whole minute inter

ANN: sigmund - systems analytics for clojure

2012-10-08 Thread zcaudate
Sigmund is friendly clojure wrapper around the Hyperic SIGAR API http://www.hyperic.com/products/sigar. It can tell you all sorts of information about your currently executing process as well as the system that you are working on. It provides quite a bit more information than JMX: os: informat

ANN: sigmund - systems analytics for clojure

2012-10-08 Thread zcaudate
Sigmund is friendly clojure wrapper around the Hyperic SIGAR API http://www.hyperic.com/products/sigar. It can tell you all sorts of information about your currently executing process as well as the system that you are working on. It provides quite a bit more information than JMX: os: informati

Slightly updated Clojure cheatsheet available

2012-10-08 Thread Andy Fingerhut
http://jafingerhut.github.com The only changes since the previous version are to add a mention of *unchecked-math*, and the following new symbols in Clojure 1.4 are now mentioned. These 1.4-specific symbols have (1.4) just before them to indicate that they are only available in Clojure 1.4: E

Re: lein run deadlocking?

2012-10-08 Thread Brian Craft
CentOS release 5.5 (Final) java version "1.6.0_11" Java(TM) SE Runtime Environment (build 1.6.0_11-b03) Java HotSpot(TM) 64-Bit Server VM (build 11.0-b16, mixed mode) On Monday, October 8, 2012 5:32:43 PM UTC-7, Andy Fingerhut wrote: > > Which OS are you using? > > Which JVM? (i.e. output of

Re: lein deps

2012-10-08 Thread John Gabriele
On Monday, October 8, 2012 8:11:52 PM UTC-4, Brian Craft wrote: > > Apparently. I'm completely baffled by module naming and references. jdbc > in project.clj is org.clojure/java.jdbc, but is clojure.java.jdbc in the > (ns) call? gloss is gloss in project.clj but gloss.core, gloss.io in the > (ns

Re: Question on mandatory arguments for -> and ->> macros

2012-10-08 Thread Jason Wolfe
On Sunday, October 7, 2012 9:27:15 PM UTC-7, Shantanu Kumar wrote: > > > > On Monday, 8 October 2012 04:57:06 UTC+5:30, Stuart Sierra wrote: >> >> From the look of the source, there's no reason why ->> couldn't have >> arity-1. I guess it just doesn't come up much. >> > > Arity-1 for ->> would b

Re: lein run deadlocking?

2012-10-08 Thread Andy Fingerhut
Which OS are you using? Which JVM? (i.e. output of "java -version") Andy On Oct 8, 2012, at 5:25 PM, Brian Craft wrote: > I'm noticing that very regularly "lein run" will hang. Where it hangs is > variable. At the moment it's right here: > > > lein run > Compiling downsample.core > > > Tho

lein run deadlocking?

2012-10-08 Thread Brian Craft
I'm noticing that very regularly "lein run" will hang. Where it hangs is variable. At the moment it's right here: > lein run Compiling downsample.core Though sometimes it's after dumping some errors, here, for example: at clojure.lang.LispReader.read(LispReader.java:180) at clojure.lang.Compil

Re: lein deps

2012-10-08 Thread Brian Craft
Apparently. I'm completely baffled by module naming and references. jdbc in project.clj is org.clojure/java.jdbc, but is clojure.java.jdbc in the (ns) call? gloss is gloss in project.clj but gloss.core, gloss.io in the (ns) call. Is unzipping the jars the only way to know how to reference a mod

lein deps

2012-10-08 Thread Brian Craft
I was able to use lein to pull in org.clojure/java.jdbc and mysql/mysql-connector-java. Now I'm trying to pull in gloss and am unable to figure out why it's failing. "lein deps" appeared to work, and populated a directory under ~/.m2, but adding a (:require [gloss]) to my (ns) call always resul

Interest in Scribble for Clojure?

2012-10-08 Thread Grant Rettke
Hi, Scribble is a DSL for Racket that lets you do some nice stuff for generating documentation. Examples and documentation are here: http://docs.racket-lang.org/scribble/ Any existing solutions or interest in something like this? The value-adds are that you have your in-code documentation execu

Re: Preferred business rules engines in or used by Clojure?

2012-10-08 Thread Mark
On Sunday, October 7, 2012 10:16:58 AM UTC-7, Grant Rettke wrote: > > Hi, > > May you please share your experience or preferences for rules engines > written in or used from Clojure? > > My goal is to: > > 1. Allow rule definitions separate from the code (though I view rule > definitions as

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread Frank Siebenlist
You're cheating !!! You just added the "(should use CrossPageChannel)" to the subject header ;-) Not sure if I can help here as I just learnt about the existence of a "CrossPageChannel" a day or so ago… … I do agree with the JIRA-priority that this is a "Major" issue, as the help/reflection fa

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread David Nolen
On Mon, Oct 8, 2012 at 4:13 PM, Frank Siebenlist wrote: > Ok - thanks - slowly start to see the path ;-) > > I cannot find an explicit JIRA entry for that "reflection interface over > CrossPageChannel" - should I add one for this, or did I miss the issue#? > > -FS. http://dev.clojure.org/jira/br

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread Frank Siebenlist
Ok - thanks - slowly start to see the path ;-) I cannot find an explicit JIRA entry for that "reflection interface over CrossPageChannel" - should I add one for this, or did I miss the issue#? -FS. On Oct 8, 2012, at 12:47 PM, David Nolen wrote: > On Mon, Oct 8, 2012 at 3:45 PM, Frank Sieben

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread David Nolen
On Mon, Oct 8, 2012 at 3:45 PM, Frank Siebenlist wrote: > Understood that was the initial reason, but how about the reflection > interface? > > Should that be rerendered to use the same CrossPageChannel connection? > > -FrankS. Yes, that is what I was suggesting earlier :) David -- You receiv

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread Frank Siebenlist
Understood that was the initial reason, but how about the reflection interface? Should that be rerendered to use the same CrossPageChannel connection? -FrankS. On Oct 8, 2012, at 12:03 PM, David Nolen wrote: > On Mon, Oct 8, 2012 at 2:38 PM, Frank Siebenlist > wrote: >> However, I find the b

Re: ANN clojure-doc.org (aka CDS), a new community-driven Clojure documentation site

2012-10-08 Thread Michael Klishin
2012/10/8 Laurent PETIT > By signing the CA agreement you did not give away your copyright on stuff > you made, so I think it's ok for you to copy what *you* wrote there. This is my understanding as well but I am not a lawyer. Content from clojure.org won't be merged for two reasons: * I don

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread David Nolen
On Mon, Oct 8, 2012 at 2:38 PM, Frank Siebenlist wrote: > However, I find the basic deployment that is prescribed by lein-cljsbuild not > very "basic" when it starts-up 3 different jvm's while the repl-server and > webserver do not share the live clojurescript metadata, and where we have > issu

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread Frank Siebenlist
Kevin - thanks for the pointers. I looked at those projects before, and they do make it easier to use the clojurescript-repl thru nrepl&friends, but unless I missed the features, it doesn't help with moving the repl-server in the same execution context as the web server, and to make the reflect

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread Frank Siebenlist
I understand the idea of minimizing the dependencies of a basic clojurescript development deployment with a working repl. However, I find the basic deployment that is prescribed by lein-cljsbuild not very "basic" when it starts-up 3 different jvm's while the repl-server and webserver do not sha

Re: ANN: polyfn

2012-10-08 Thread Tassilo Horn
Paul Stadig writes: Hi Paul, > I created a library for Clojure to do open, single dispatch > polymorphism. What does this mean? > > * A polyfn dispatches on the type of its first argument. > * You can add an implementation for a new type to an existing polyfn. > * You can define a new polyfn on

Re: File endings proposal for easier cross-compiling

2012-10-08 Thread Jim - FooBar();
On 08/10/12 18:33, Stuart Sierra wrote: Feature Expressions provide an escape from file extensions. http://dev.clojure.org/display/design/Feature+Expressions Everything could become a .clj file. Sources dedicated to different targets would live in different directories. -S -- You received thi

Re: ANN clojure-doc.org (aka CDS), a new community-driven Clojure documentation site

2012-10-08 Thread John Gabriele
On Monday, October 8, 2012 12:26:23 PM UTC-4, Michael Klishin wrote: > > ## Announcing clojure-doc.org > > I am starting a new thread because the existing one about CDS is now > polluted by all kinds of off-topics. > > About a week ago, John Gabrielle > Just one ell. :) > announced CDS (Clojur

Re: ANN clojure-doc.org (aka CDS), a new community-driven Clojure documentation site

2012-10-08 Thread nchurch
Quick question: would it be possible to copy stuff from dev.clojure.org? I wrote some stuff over there, under the CA agreement, but it's kind of a wiki format so it might be unclear who 'owns' it. BTW, I noticed the front page of clojure.org got its headings cleaned upthank you to whoever did

Re: File endings proposal for easier cross-compiling

2012-10-08 Thread Stuart Sierra
Feature Expressions provide an escape from file extensions. http://dev.clojure.org/display/design/Feature+Expressions Everything could become a .clj file. Sources dedicated to different targets would live in different directories. -S -- You received this message because you are subscribed to t

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread Kevin Downey
I'd checkout nrepl and nrepl middlewares, which can be exposed over http (via ring middleware) or other transports. https://github.com/hiredman/drawbridge-cljs is an nrepl http client for clojurescript https://github.com/hiredman/nrepl-cljs-middleware is an example of a nrepl middleware, which ex

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread David Nolen
On Mon, Oct 8, 2012 at 12:51 PM, Frank Siebenlist wrote: > I've been digging through the clojurescript code lately, and making some > changes to the repl-related code. This is quite difficult as clojurescript > seems to have its own "proprietary" implementation of a webserver that serves > the

Cljs-repl server as ring middleware?

2012-10-08 Thread Frank Siebenlist
I've been digging through the clojurescript code lately, and making some changes to the repl-related code. This is quite difficult as clojurescript seems to have its own "proprietary" implementation of a webserver that serves the repl-communication as well as other possible handlers, like the r

newbie questions about evaluation and -main

2012-10-08 Thread Brian Craft
I started with a db example and dropped this into the core.clj of an 'app' project, just before the defn for -main. (sql/with-connection db (sql/with-query-results rs ["select * from foo limit 3"] (dorun (map #(println %) rs On "lein run" this prints three rows, but prints them twice.

Re: ANN: polyfn

2012-10-08 Thread Paul Stadig
On Mon, Oct 8, 2012 at 11:33 AM, Timothy Baldridge wrote: > >>> Define some implementations for specific types. >>> >>> (require '[name.stadig.polyfn :refer [defpolyfn]]) >>> (defpolyfn foo Long [exp] (inc exp)) >>> (defpolyfn foo String [exp] "Hello, World!") > > I like the idea, but it seems

Re: ANN: polyfn

2012-10-08 Thread Timothy Baldridge
>> Define some implementations for specific types. >> >> (require '[name.stadig.polyfn :refer [defpolyfn]]) >> (defpolyfn foo Long [exp] (inc exp)) >> (defpolyfn foo String [exp] "Hello, World!") I like the idea, but it seems to go against the pattern set by multi-fns: (defmulti foo...) (defme

ANN: polyfn

2012-10-08 Thread Paul Stadig
I created a library for Clojure to do open, single dispatch polymorphism. What does this mean? * A polyfn dispatches on the type of its first argument. * You can add an implementation for a new type to an existing polyfn. * You can define a new polyfn on an existing type. Polyfns are exactly as f

Re: basic quoting question

2012-10-08 Thread Ben Smith-Mannschott
On Mon, Oct 8, 2012 at 5:06 PM, Brian Craft wrote: > Thanks! > > Is the string vs symbol distinction peculiar to clojure, among lisps? > Yes, strings are distinct from symbols in every reputable lisp. That symbol and keyword know how to look themselves up in an associative collection is, as far

Re: clojure.java.jdbc create-table

2012-10-08 Thread Stephen Compall
On Oct 5, 2012 11:15 AM, "Matt" wrote: > When I use the form create-table passed-argument [fields] as opposed to a constant as in create-table :hard-coded-entity-name [fields], create-table is an ordinary function without an inliner: https://github.com/clojure/java.jdbc/tree/java.jdbc-0.2.3#L522

Re: basic quoting question

2012-10-08 Thread Brian Craft
Thanks! Is the string vs symbol distinction peculiar to clojure, among lisps? On Monday, October 8, 2012 8:03:00 AM UTC-7, Jack Moffitt wrote: > > > user=> ('X 'Y) > > nil > > > > All of these are as I expected except the last, which I thought would > throw > > something like the 1st case. W

Re: basic quoting question

2012-10-08 Thread Jack Moffitt
> user=> ('X 'Y) > nil > > All of these are as I expected except the last, which I thought would throw > something like the 1st case. What's going on there? You've prevented X from being evaluated (it will be seen as the symbol X), but you haven't prevented evaluation of the function call. Symbols

Re: basic quoting question

2012-10-08 Thread Jay Fields
symbol, 'X in the last case, implements IFn, and you're calling it with the symbol 'Y as an argument. On Mon, Oct 8, 2012 at 9:43 AM, Brian Craft wrote: > user=> ("X" "Y") > ClassCastException java.lang.String cannot be cast to clojure.lang.IFn > user/eval116 (NO_SOURCE_FILE:32) > user=> '(X Y) >

basic quoting question

2012-10-08 Thread Brian Craft
user=> ("X" "Y") ClassCastException java.lang.String cannot be cast to clojure.lang.IFn user/eval116 (NO_SOURCE_FILE:32) user=> '(X Y) (X Y) user=> ['X 'Y] [X Y] user=> '[X Y] [X Y] user=> ('X 'Y) nil All of these are as I expected except the last, which I thought would throw something like th

Re: Core.logic performance of looping over a list with tabling

2012-10-08 Thread David Nolen
On Monday, October 8, 2012, Reinout Stevens wrote: > > > > On Saturday, October 6, 2012 1:53:42 AM UTC+2, David Nolen wrote: >> >> On Mon, Oct 1, 2012 at 9:13 AM, Reinout Stevens wrote: >>> >>> Hi, >>> >>> >>> I quickly changed the code so that the graph structure no longer contains >>> the list

Re: Clojurejs: a lightweight clojure to javascript compiler

2012-10-08 Thread Jim foo.bar
On 08/10/12 14:47, Mark Rathwell wrote: ClojureScript is a Clojure implementation that targets Javascript (meaning that Clojure core, et al, is also necessarily converted to Javascript in the build process and a part of what you ship). I'm assuming this project is a straight translator from Cloj

A/B testing in Clojure?

2012-10-08 Thread Simon Holgate
Hi, Is anyone doing split (A/B) testing in Clojure? What are you using? Any pointers on things to consider if I'm implementing it myself? Thanks, Simon -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@go

Re: Core.logic performance of looping over a list with tabling

2012-10-08 Thread Reinout Stevens
On Saturday, October 6, 2012 1:53:42 AM UTC+2, David Nolen wrote: > > On Mon, Oct 1, 2012 at 9:13 AM, Reinout Stevens > > > wrote: > >> Hi, >> >> >> I quickly changed the code so that the graph structure no longer contains >> the list of nodes, and the same behaviour still persists. For the ac

Re: Clojurejs: a lightweight clojure to javascript compiler

2012-10-08 Thread Mark Rathwell
> Now I'm confused! Isn't clojureScript exactly that? ClojureScript is a Clojure implementation that targets Javascript (meaning that Clojure core, et al, is also necessarily converted to Javascript in the build process and a part of what you ship). I'm assuming this project is a straight transla

Re: Clojurejs: a lightweight clojure to javascript compiler

2012-10-08 Thread Timothy Baldridge
> Clojurejs started by > [kriyative](https://github.**com/kriyative) > is an amazing project that compile clojure to javascript. > This can hardly be called Clojure. The syntax may be similar, but the semantics are all wrong. >From boot.cljs (defn map [fun arr]

Re: cli latency

2012-10-08 Thread Paul deGrandis
I recently started working on cli ClojureScript apps. After a few stumbling block (like Node.js lacking a synchronous command exec), I'm well on my way. If you don't have to target the JVM for the CLI interface, this is an option I would consider. You could still do the longer-running service

Re: Clojurejs: a lightweight clojure to javascript compiler

2012-10-08 Thread Jim foo.bar
On 08/10/12 07:18, Hoàng Minh Thắng wrote: Clojurejs started by [kriyative](https://github.com/kriyative) is an amazing project that compile clojure to javascript. Now I'm confused! Isn't clojureScript exactly that? Jim -- You received this message because you are subscribed to the Google Gro

Clojurejs: a lightweight clojure to javascript compiler

2012-10-08 Thread Hoàng Minh Thắng
Hi all, Clojurejs started by [kriyative](https://github.com/kriyative) is an amazing project that compile clojure to javascript. I've just made it available in clojure 1.4.0, rewrite tests with [evaljs](https://github.com/weavejester/evaljs/) and add macros like ., .., -> and ->>. Github repo:

Re: apply: increase performance by 60% for fixed length

2012-10-08 Thread Marc Dzaebel
So *applyn *is only 3% faster for generated sequences with 10 elements (on my machine with 1.4 too). Reducing the number of elements has a better effect: (let[t(fn[](applyn 5 + (range 1 6)))] (time(dotimes [_ 100] (t ;438 msec (let[t(fn[](apply + (range 1 6)))] (time(dotimes [_ 100]