Re: multimethod noob question

2013-06-22 Thread Chris Bilson
Dennis Haupt writes: > yes. all glory to the repl that makes me figure out the internals via > experiments :D > is there a way to just pass the given value along? Yes, that's what I meant by my inspect method in my original reply. It prints the value and passes it along: (defn inspect [

Re: multimethod noob question

2013-06-22 Thread Chris Bilson
Dennis Haupt writes: > i am not trying anything, i just want to figure out what happens. this is my > output for the "print" version: > user=> (defmulti fac print) > (defmethod fac 1 [_] 1) > (defmethod fac :default [n] (*' n (fac (dec n > #'user/fac > # > # > user=> (fac 1) > 10-1-2-3-4-5-6

Re: multimethod noob question

2013-06-22 Thread Chris Bilson
Dennis Haupt writes: > i was taking a look at multimethods: > (defmulti fac int) > (defmethod fac 1 [_] 1) > (defmethod fac :default [n] (*' n (fac (dec n > > this works > > however, this also works: > > (defmulti fac print) > (defmethod fac 1 [_] 1) > (defmethod fac :default [n] (*' n (fac (

Re: In what OS do you code?

2013-06-17 Thread Chris Ford
Robert, the Leiningen survey might under-report Windows-based usage of Clojure, as I think Eclipse+Counter-clockwise is especially popular there. On 17 June 2013 02:03, Robert Levy wrote: > There's the "State of Clojure Survey": > http://cemerick.com/2012/08/06/results-of-the-2012-state-of-cloj

Re: I need a configuration solution

2013-06-17 Thread Chris Ford
Hi Mingqi, Could you please give us some more context? What kind of configuration are you trying to manage? Cheers, Chris On 17 June 2013 10:45, Mingqi wrote: > I need a configuration solution > > -- > -- > You received this message because you are subscribed to the

Re: Data vs API

2013-06-12 Thread Chris Ford
complexity designed to save people with poor judgement from themselves. If someone wants to build code around details of your data structures, let them. Cheers, Chris On Sunday, May 6, 2012 8:11:13 PM UTC+3, Antonio Shastun wrote: > > can any one explain to me please > > &qu

Re: Clojure in production

2013-06-11 Thread Chris Wilson
Hi, At Planspot.com we're migrating some old code to Clojure and writing most new backend code in it. So far that is some API components for recording and serving statistical data and the backend of a contact aggregation, enrichment and management system. Cheers, Chris On 11 June 2013

Re: newbie question about symbols

2013-05-30 Thread Chris Jeris
Commas are whitespace in Clojure. If you are looking for the unquote operator, it is ~. user=> (first `(~+ 5)) # peace, Chris On Thu, May 30, 2013 at 5:42 PM, Brian Craft wrote: > What's up with the 3rd result here? > > user=> (symbol? +) > false > user=> (sy

Re: org.junit.Assert/assertArrayEquals massive confusion!

2013-05-28 Thread Chris Jeris
junit/blob/master/src/main/java/org/junit/Assert.java#L474 peace, Chris On Tue, May 28, 2013 at 12:42 PM, Jim - FooBar(); wrote: > Hi everyone, > > sometimes I feel really stupid! > > I am currently looking at a well-known java library's tests and found this: > > Assert.

Re: Any alternatives for these two ugly patterns?

2013-05-25 Thread Chris Ford
Here's how I did it, which is similar to what atkaaz and Jim were suggesting: (defn whenever [x applies-to? f] (if (applies-to? x) (f x) x)) (whenever obj :attr #(assoc % :attr something)) (whenever obj some-test some-transformation) On 25 May 2013 15:19, atkaaz wrote: > > > > On Sat, May 25,

Re: Defining the ground truth

2013-05-23 Thread Chris Ford
nd fail if they're out of date. It sounds also like the project you're talking about had a lot of good ol' fashioned technical debt. Code won't be readable if it's badly written - but neither will natural language. Cheers, Chris On 22 May 2013 20:29, Tim Daly wrote: &

Re: How to: reduce boolean operations?

2013-05-22 Thread Chris Ford
The reason "and" is a macro is that it's designed to short-circuit - ie if the first result is false the rest shouldn't even be evaluated. Using it on raw booleans works, because booleans evaluate to themselves, but it's really designed to be given forms. The absence of a pure function for conjun

Re: Meta-eX: Hacking Overtone on the Stubnitz - Thurs 16th May

2013-05-14 Thread Chris Ford
> > Le lundi 13 mai 2013 15:32:55 UTC+2, Sam Aaron a écrit : > >> Hey everyone, >> >> You've heard of people live coding Clojure examples as part of their >> talks. Heck, you've probably even seen Stuart Halloway jam on Chris Ford's >> Bach co

Re: ritz-nrepl starts up slowly?

2013-05-13 Thread Chris Ford
You could try lein -o to make sure that your startup isn't blocking on network. On 14 May 2013 01:50, yizhen wei wrote: > I heard using a sdd can reduce the time a lot. Maybe 5x? > Can someone confirm on that? > > > On Monday, May 13, 2013 6:17:38 PM UTC-4, Warren Lynn wrote: >> >> >> >>> Is it

Re: Why is using (not (empty? coll)) not idiomatic?

2013-05-11 Thread Chris Ford
IMHO it's a bit subjective, but empty? is defined as (not (seq coll)), so using (not (empty? coll)) is really saying (not (not (seq coll))), which feels a bit backwards. Using seq also plays nicely with if-let: (if-let [foo (seq "hey")] (print foo)) (if-let [foo (seq "&qu

Re: Not using dependency injection - how do I share services around?

2013-05-11 Thread Chris Ford
Sounds to me like there's enough meat in this topic for someone to consider submitting a talk to the upcoming EuroClojure or Clojure/conj on what Clojure means for DI. It's a commonly asked question, and it could be an opportunity for The Cl

Re: Not using dependency injection - how do I share services around?

2013-05-10 Thread Chris Ford
A good question. One way is to use partial application to bake the data source into a fn: (def read (partial read-from-db *data-source*)) On 10 May 2013 14:04, Colin Yates wrote: > (newbie, getting better each day!) > > I assume we all know DI. Through the use of a central registry I can > re

Re: memorize-clj

2013-04-29 Thread Chris Ford
Jorge, reinventing the wheel is a very worthwhile pursuit. Maybe you'll come up with something new, and certainly you'll learn something. Thanks for sharing. Chris On 29 April 2013 08:23, Baishampayan Ghose wrote: > One more reason to read Clojure's source code. Trust me,

Re: Test strategy

2013-04-19 Thread Chris Ford
ts to your extraction fns, and then just compare the output to what you expected? If the issue is that the extraction isn't done by top-level fns, and thus is hard to test, perhaps you could just make them top-level fns? Cheers, Chris On 19 April 2013 15:14, Jonathon McKitrick wrote: > A

Re: Good Clojure style?

2013-04-15 Thread Chris Webster
Well, Luc, I'm still not convinced there is such a significant decline in performance with age - maybe I never reached as high a peak in the first place! But I certainly agree that it's important to "work smarter, not harder" as we gain the experience to do so, especially in Javaland where so ma

Re: Good Clojure style?

2013-04-14 Thread Chris Webster
Uh, Luc, are you suggesting anybody over the age of 30 can't code productively any more? Because it sure sounds like that. If so, that seems like a curiously ageist argument to make in a Clojure thread. I'll leave it to the legions of skilled and productive programmers over 30 to contradict t

Re: why can I re-use local variables if Clojure is immutable?

2013-04-03 Thread Chris Perkins
On Tuesday, April 2, 2013 1:09:25 PM UTC-6, larry google groups wrote: > > > If Clojure is suppose to emphasize immutability, why can I do this: > > kiosks-clojure.core=> (let [ > #_=> mega (+ 1 1) > #_=> mega (+ 1 mega) > #_=> mega (+ 1 mega) >

Re: Clojure videos deleted from blip.tv?

2013-04-02 Thread Chris Webster
; > On Tue, Apr 2, 2013 at 11:20 AM, Chris Webster > > > wrote: > >> I just went to blip.tv and searched for Clojure and there's nothing >> there. Anybody know what's happened to all that great content? It would >> be a real shame if it's no long

Re: Clojure videos deleted from blip.tv?

2013-04-02 Thread Chris Webster
I just went to blip.tv and searched for Clojure and there's nothing there. Anybody know what's happened to all that great content? It would be a real shame if it's no longer available anywhere. Chris On Thursday, December 13, 2012 4:40:21 AM UTC, Alex Grigorovitch wrote: &g

Re: LoL which style for Clojure

2013-03-22 Thread Chris Hapgood
two. The second approach allows you to close over x with multiple functions: (let [x {:foo 1 :bar 2 :baz 3}] (defn f3 [] (keys x)) (defn f4 [] (vals x))) -Chris On Friday, March 22, 2013 2:59:43 PM UTC-4, jamieorc wrote: > > Curious which style is preferred in Clojure an

Re: Google Summer of Code 2013 Ideas

2013-03-16 Thread Chris Bui
oving cemerick's > Friend library. There are a bunch of interesting features yet to be > implemented! > > On Saturday, March 16, 2013 6:00:44 AM UTC+1, Chris Bui wrote: >> >> Hi everybody, I'm a student looking to apply for GSOC 2013. I'm trying to >&g

Google Summer of Code 2013 Ideas

2013-03-16 Thread Chris Bui
y. Also, I'm primarily a web developer so I would prefer ideas in that space if possible, not a requirement. Here are some of my ideas: - A static site generator like Jekyll. This was one of the ideas on the list from 2012, don't think Chris Granger is going to be available to

Re: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Chris Ford
ng way. Cheers, Chris On 14 March 2013 16:06, Daniel Higginbotham wrote: > Thanks! Updated! > > > On Thursday, March 14, 2013 8:28:47 AM UTC-4, Marko Topolnik wrote: >> >> One point crosses my mind: JAR is a regular ZIP file. First time I >> learned that, I fe

Re: What's the point of -> ?

2013-03-11 Thread Chris Ford
I wouldn't say imperative, rather pipelined. -> can be used to represent a deeply nested expression as a pipeline. On 11 March 2013 13:58, wrote: > So I understand that: > > (-> foo bar wibble) > > is equivalent to > > (wibble (bar (foo))) > > With the advantage that the latter version is better

Re: (def function* ... ???

2013-02-28 Thread Chris Ford
Sometimes people separate a macro into the macro itself, and a normal function that does the actual work. The normal function often has the same name as the macro but with a * suffix. Chris On 28 February 2013 13:38, Dave Sann wrote: > I see cases of * after function names. > > C

Re: wouldn't it make sense for identity to take variadic args?

2013-02-27 Thread Chris Ford
Can you give an example use case? Personally, I would be a little surprised to find out that identity worked like this. After all, why return the first argument, why not the last? Or a vector of all the arguments? Cheers, Chris On 27 February 2013 15:02, Jim foo.bar wrote: > I often f

Re: How does clj-http work regarding https?

2013-02-23 Thread Chris Jeris
om it, >> send >> > > an >> > > > > email to clojure+unsubscr...@googlegroups.com. >> > > > > For more options, visithttps://groups.google.com/groups/opt_out. >> > >> > > -- >> > > -- >> > > You received this me

Re: does lein2 use repositories defined in ~/.m2/settings.xml?

2013-02-21 Thread Chris Jeris
ny corresponding "parent project" concept for Leiningen, correct? I experimented a bit with trying to use a Lein middleware to supply the repo entries, but unless you install the middleware manually, that ends up begging the question, since Lein has to know where to get t

Re: Clojure Position

2013-02-12 Thread Chris Ford
Murtaza, I'm guessing you probably didn't want to send us all your resume... Cheers, Chris On 13 February 2013 09:57, Murtaza Husain wrote: > > Alex are you still looking for clojure developers. I am attaching my > resume. > > On Saturday, June 16, 2012 11:44:41 PM

Re: Clojure - Python Style suggestion

2013-02-06 Thread Chris Ford
If someone does write a Lisp with significant whitespace, can we please call it "Whitespathe"? On 7 February 2013 10:30, Marco Munizaga wrote: > We had this talk with scheme. They called it I expressions. Here is the > link http://srfi.schemers.org/srfi-49/srfi-49.html > > Do it because you can,

Re: reload file in lein

2013-01-28 Thread Chris F Carroll
Does just loading the file again not work: repl>(load-file src/foo/core.clj) On Monday, 15 August 2011 01:20:14 UTC+1, Jay Vyas wrote: > > hi guys, Im doing the following development "workflow" > > -> edit a script in vi > -> save > -> $> lein repl > -> repl>(load-file src/foo/core.clj) >

Re: [ANN] Overtone 0.8.0 - "Performance Ready"

2013-01-27 Thread Chris Ford
Thanks to everyone who worked hard to make 0.8.0 happen, especially Sam. :-) On 27 January 2013 02:00, Sam Aaron wrote: > > On 26 Jan 2013, at 20:17, Sam Aaron wrote: > > > I pulled out the GUI widgets from this release as I found a number of > issues with them at the last minute and want them

Re: ANN Drip: A fast JVM launcher

2013-01-23 Thread Chris Altman
I'm getting the same behavior. Has there been any action on this? On Monday, September 17, 2012 11:12:20 AM UTC-4, Gary Johnson wrote: > > I'm getting the same multiple JVM starting behavior on Arch Linux using > lein 2.0.0-preview10 and drip 0.1.7. Hmm... > > > On Monday, September 17, 2012 2

Re: Help: instance? always false for record type (in tomcat but not in jetty)

2012-12-13 Thread Chris Jeris
In the Tomcat uberwar setting, is ns1 AOT-compiled? Are (.getClassLoader A) and (.getClassLoader (.getClass an-A-record)) different class loaders? That's what the problem was when this one bit me. I never did track down exactly why it happens or how to fix it. peace, Chris Jeris On Thu, D

Re: clojure.string/capitalize API

2012-12-12 Thread Chris Ford
This seems like quite a specialised function to have in a core string library. To me, the only behaviour that would be generic enough to include in a core library would be to capitalise all the letters of the string. On 12 December 2012 17:12, Pierre Allix wrote: > Hello, > > The clojure.string

Re: help choosing dev environment for clojure

2012-11-27 Thread Chris Ford
executing forms within my editor) a better way to work out what's going on than debugging through an actual program execution. Cheers, Chris On 28 November 2012 06:43, Phil Hagelberg wrote: > On Tue, Nov 27, 2012 at 1:30 PM, Walter van der Laan > wrote: > > Stepping through the execu

Re: slow repl startup because of package finding

2012-11-02 Thread Chris Ford
id lein -o). Cheers, Chris On 2 November 2012 12:56, Meikel Brandmeyer (kotarak) wrote: > Hi, > > Am Freitag, 2. November 2012 08:23:00 UTC+1 schrieb Satoru Logic: > >> Hi, all. >> >> Every time I type `*lein repl*`, several line of log get printed out: >> >>

AOT-compilation, record types and DynamicClassLoader

2012-10-16 Thread Chris Jeris
find any follow-up posts: https://groups.google.com/forum/?fromgroups=#!topic/clojure-dev/VBJFMEFBeFY Can anyone shed light on the situation? thanks, Chris Jeris -- Chris Jeris cje...@brightcove.com (617) 686-3271 freenode/twitter/github: ystael -- You received this message because you are subs

Re: Light Table Playground got a lot more useful.

2012-09-27 Thread Chris Granger
Cmd/Ctrl means either the Cmd key (which is on macs) or the Ctrl key on windows/linux. So if it says Cmd/Ctrl + d that would mean just ctrl + d. Cheers, Chris. On Wed, Sep 26, 2012 at 5:01 PM, humblepie wrote: > For the life of me I can figure out the key binding for the Cmd key. Can > s

Re: ANN Ritz 0.5.0

2012-09-26 Thread Chris Jeris
s packages were installed from marmalade. thanks, Chris Jeris On Mon, Sep 24, 2012 at 10:49 PM, Hugo Duncan wrote: > > Tim, > > > Timothy Washington writes: > > > I was following the instructions on the ritz-nrepl > > page<https://github.com/pallet/ritz/tree/develop/

Re: ClojureScript and development workflow

2012-09-11 Thread Chris Granger
p) will include a nice way to work with CLJS such that a very nice getting started video could be created. :) Cheers, Chris. On Tuesday, September 11, 2012 6:10:29 AM UTC-7, Chas Emerick wrote: > > On Sep 11, 2012, at 4:00 AM, Laurent PETIT wrote: > > 2012/9/10 Chas Emerick > >

Re: Plural dispatch

2012-09-11 Thread Chris Ford
ly be useful if you were using plural dispatch as an event dispatching system, though whether it would be wise is another question... Cheers, Chris On 6 September 2012 20:27, Brent Millare wrote: > I've made my own take of your plural dispatch system. > > https://gist.github.com/365

Plural dispatch

2012-09-05 Thread Chris Ford
args] (-> implementations rand-nth (apply args (defimplementation random #(+ % 100)) (defimplementation random #(- % 100)) (random 1) It could also be useful for gathering a set of all possible results, quasi-AOP extension points, broadcasting events etc. Cheers, Chris -- You received this mess

Re: clojure.org down

2012-08-27 Thread Chris Ford
Adam Frey from wikispaces pinged me back. Seems like he fixed whatever the problem was. On 27 August 2012 20:42, Mayank Jain wrote: > Working fine for me. > > On Tue, Aug 28, 2012 at 12:58 AM, Chris Ford > wrote: > >> Hi, >> >> clojure.org seems to be down

Re: clojure.org down

2012-08-27 Thread Chris Ford
Looks like it's back up. On 27 August 2012 20:28, Chris Ford wrote: > Hi, > > clojure.org seems to be down. I've mailed h...@wikispaces.com. > > Cheers, > > Chris > -- You received this message because you are subscribed to the Google Groups "Clojure&qu

clojure.org down

2012-08-27 Thread Chris Ford
Hi, clojure.org seems to be down. I've mailed h...@wikispaces.com. Cheers, Chris -- 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 mod

Re: doubt about clojure.test output

2012-08-18 Thread Chris Ford
Would you be able to post some code demonstrating what you have observed, perhaps reduced to the minimal case? Cheers, Chris On 18 August 2012 13:49, Vincent wrote: > Dear , > > I am using clojure.test for test > > in one 'deftest , i had used 3 'is function t

Re: Attractive examples of function-generating functions

2012-08-09 Thread Chris Ford
src/goldberg/variations/canone_alla_quarta.clj> . Cheers, Chris On 9 August 2012 05:44, Ben Mabey wrote: > On 8/8/12 10:48 AM, Brian Marick wrote: > >> I'm looking for medium-scale examples of using function-generating >> functions. I'm doing it because examples like thi

Re: [ldnclj] Re: 6 December 2012 - London - Clojure eXchange - Call for Presentations

2012-07-31 Thread Chris Ford
Will this be the best Clojure event? http://skillsmatter.com/event/clojure/haskell-exchange-2012 Chris On 31 July 2012 16:15, cassiel wrote: > Yep... my presentation proposal went in last week... > > > http://skillsmatter.com/event/**scala/clojure-exchange<http://skillsmatter.

Re: Idea around SCMs and Clojure

2012-07-18 Thread Chris Ford
I really hope that refactoring-aware diffs are on their way. They'll allow for a whole class of merge conflicts to be resolved automatically. Chris On 18 July 2012 14:19, Leonardo Borges wrote: > I haven't been following this discussion that closely so far but I'd > like t

Re: seeking namespace-aware xml lib

2012-07-17 Thread Chris Perkins
s that it is not lazy like data.xml, so can run out of memory parsing large documents. Also, I did some perf testing and found it to be quite slow, but I never found time to investigate why. I hope it's useful to you. - Chris Perkins -- You received this message because you are subscribed

setting a default route in noir

2012-07-13 Thread Chris McBride
I have a lot of defpages that have a long part of the url in common (ex. "/client/:clientid/someresource/"). So I made a function to encapsulate the beginning of the URL, but the defpage macro expects a string and not a function call. Is there an easy way to have the begging of the route be the

Light Table Playground got a lot more useful.

2012-07-09 Thread Chris Granger
Hey folks, In case you missed it via other channels, the Light Table Playground can now hook into your own projects! http://www.chris-granger.com/2012/07/09/light-table-playgrounds-level-up/ Take her for a spin :D Cheers, Chris. -- You received this message because you are subscribed to the

Re: A tutorial for how to setup your clojure development environment for: Emacs, Leiningen and Linux.

2012-06-20 Thread Chris Zheng
I was using textmate and a repl for the longest time because I was put off by the intricacies of emacs.. and then I found this: https://github.com/overtone/emacs-live and the tutorial that recommended it http://www.vijaykiran.com/2012/01/11/web-application-development-with-clojure-part-1/ It's

Re: How to speed up Clojure Training for New Recruitment

2012-06-18 Thread Chris Ford
mmers! Cheers, Chris On 18 June 2012 08:11, Murtaza Husain wrote: > Hi, > > Just wanted to get pointers on how do you manage the training of recruits. > It is difficult to find clojure talent, and we are located in India, where > it is close to impossible. Also the non availability

Re: How about 'nth' accepts maps?

2012-06-12 Thread Chris Ford
Meikel is quite right. I should have said that maps and sets support seq... I guess the question should then be, should nth call seq on its argument? On 12 June 2012 11:31, Meikel Brandmeyer (kotarak) wrote: > Hi, > > Am Dienstag, 12. Juni 2012 12:10:08 UTC+2 schrieb Chris Ford: &

Re: How about 'nth' accepts maps?

2012-06-12 Thread Chris Ford
While it would be possible to support it, I don't think that it makes sense for maps (or sets). While first and next need to be supported to make maps and sets sequable, I don't think that conceptually the elements are ordered. Cheers, Chris On 12 June 2012 11:03, Yoshinori Kohy

Re: Memory issues processing large lazy sequences

2012-06-08 Thread Chris Perkins
round on the IRC channel and > looked here, the number 1 cause of such problems is inadvertently holding > onto the head; but I can't see where I'm doing this. > > (dorun (take 2000 (add-layer))) > take holds on to the head, because that is what it returns. Try chan

Re: Slow 'quick sort'

2012-06-08 Thread Chris Ford
Another advantage to choosing the first element as a pivot is that you can use destructuring: (defn qsort [[pivot & coll]] (if coll) On 8 June 2012 08:44, Mark Engelberg wrote: > last and drop-last are slow operations on seqs, and no matter what you > pass in for the initial input, once you

Re: function evaluation inside list literal

2012-05-28 Thread Chris Ford
To add to Tassilo's answer, quoting blocks evaluation all the way down. So even though I don't have the functions foo or bar defined: user=> '(foo (bar)) (foo (bar)) There's no error, because neither is evaluated. Chris On 28 May 2012 18:58, Tassilo Horn wrote: > M

Re: Parallel doseq?

2012-05-24 Thread Chris Perkins
the code you pasted is simply an errant closing paren. You had (do (doall (pmap ...) nil)), where you meant (do (doall (pmap ...)) nil). Apparently doall has a two-arg version, which is news to me :) - Chris Perkins -- You received this message because you are subscribed to the Google Groups

Re: Bootstrapping Clojure-in-Clojure

2012-05-20 Thread Chris Gray
e fair, it's only been tested with JS so far.) It's a bit out of date with respect to the rest of the Clojurescript compiler -- as I say, I've been moving -- but it's a decent proof of concept at least. The code can be found here: https://github.com/chrismgray/clojurescript/

Re: docstrings of if-let and when-let incorrect

2012-05-16 Thread Chris Ford
Personally, I would intuitively assume that none of the bindings from if-let would be available in the else branch. On 16 May 2012 14:36, Moritz Ulrich wrote: > On Wed, May 16, 2012 at 3:16 PM, Aaron Cohen wrote: > > What should happen on the else branch of the if-let; which bindings are > in >

Re: Clojure beginner in search of peer-induced enlightenment

2012-05-14 Thread Chris Ford
Are there any Clojure dojos near where you live? We have a monthly one in London, which is a great way for people of different experience levels to come together. Cheers, Chris On 14 May 2012 12:45, James wrote: > When a new technology (a programming language) comes out, initially > the

Re: Getting started

2012-05-10 Thread Chris McBride
Also you generally don't invoke the clojure jar directly. Instead have lein do that for you. http://www.unexpected-vortices.com/clojure/brief-beginners-guide/development-env.html#clojure-projects On Thursday, May 10, 2012 4:53:51 AM UTC-4, Zeno wrote: > > Hi, > I have downloaded and unzipped Cl

Re: Pulling constants out of interfaces

2012-05-01 Thread Chris Perkins
ementation is probably a more definitive definition of what characters are allowed. Consider, for example, that according to that page, ">" is not a legal character, but the threading macros, -> and ->> have been in core for ages. I doubt that those are suddenly going

Re: Disable name mangling for 'static'

2012-04-24 Thread Chris Granger
If I remember right, I did this as a workaround: (js/my.ns.express.static "public") Cheers, Chris. On Apr 24, 12:33 pm, David Nolen wrote: > It's a known bug. We should not munge JS reserved words that appear in > property access. Patch welcome. > > David > >

Re: [ANN] Finger trees in Clojurescript

2012-04-20 Thread Chris Houser
Cool --Chouser Laboriously typed on my mobile device. On Apr 20, 2012, at 6:17 AM, Jozef Wagner wrote: I've ported finger trees from Chouser's https://github.com/clojure/data.finger-tree to the Clojurescript You can find them at https://github.com/wagjo/ftree With finger tree, one can make a

Re: Getting started with lein-cljsbuild

2012-04-19 Thread Chris Perkins
" invariably means that a classpath was not quoted somewhere - the "and" being from "Documents and Settings". eg: java -cp C:\Documents and Settings\username\.lein\plugins... etc - Chris -- You received this message because you are subscribed to the Google Groups "

Re: Help in porting Hiccup to ClojureScript

2012-04-07 Thread Chris Granger
Have you seen Crate? http://github.com/ibdknox/crate On Apr 7, 1:18 pm, r0man wrote: > Hello ClojureScripters, > > I started to port the Hiccup library to ClojureScript. The goal > is to have a port of Hiccup that has exactly the same api. This > would make it possible to write views once (provi

Re: Alternative download site for Clojure 1.3?

2012-03-30 Thread Chris Webster
Thanks for the advice, guys. I think it must just have been some temporary problem on the site, as I finally got it to download late last night. Now all I have to do is learn Clojure, eh? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

Alternative download site for Clojure 1.3?

2012-03-29 Thread Chris Webster
I'm hoping to start learning Clojure (via The Joy Of Clojure book), but I'm having trouble downloading Clojure 1.3 from the http://clojure.org/downloads site. It downloads maybe 50 or 100 MB very slowly, then grinds to a halt saying the download was interrupted (on Google Chrome browser). Oth

Re: Polymorphic namespaces?

2012-03-28 Thread Chris McBride
I'm not trying to do anything in particular. I do OO programming at work and it's been pounded in my head that loose coupling is better than gift coupling. I've found it useful on a few occasions. One example, in the frontend we wrap all the database calls in a caching layer but we don't need th

Polymorphic namespaces?

2012-03-28 Thread Chris McBride
I was wondering how dependency injection is done in Clojure since functions live in static namespaces. It seems like this could be achieved by having a macro that can use runtime information to determine the mapping between a namespace and its implementation. Does this make sense? Is there a bet

Re: What is wrong with ClojureQL?

2012-03-24 Thread Chris Granger
you can find discussion of this in a few places, but here's a decent one: https://news.ycombinator.com/item?id=3420691 Cheers, Chris. On Mar 24, 7:54 pm, Daniel Jomphe wrote: > Since Korma appeared, it seems ClojureQL isn't mentioned anywhere anymore. > > Are there solid rea

Re: ClojureScript: how to get rid of "no longer a property access" warning

2012-03-22 Thread Chris Granger
+1 This confused a lot of people in my class :( Cheers, Chris. On Fri, Mar 23, 2012 at 12:55 AM, David Nolen wrote: > There is no way to suppress the warning. It's been around for long enough > in my opinion, I think we should drop it before the next release. > > David > &g

Re: Parallel SSH and system monitoring in Clojure

2012-03-16 Thread Chris McBride
Wow thats surprisingly similar, I didn't realize this existed. Thanks. On Mar 15, 10:11 pm, dennis zhuang wrote: > There is a clojure-control:https://github.com/killme2008/clojure-control > > 2012/3/16 Chris McBride > > > > > > > > > > > Hi, >

Parallel SSH and system monitoring in Clojure

2012-03-15 Thread Chris McBride
://github.com/RJMetrics/Server-Stats Best, Chris McBride -- 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 firs

A Noir + ClojureScript template

2012-03-13 Thread Chris Granger
heers, Chris. -- 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 from this group

Re: Google Summer of Code 2012 Application

2012-03-07 Thread Chris Granger
When's the official cutoff? Cheers, Chris. On Wed, Mar 7, 2012 at 2:24 PM, David Nolen wrote: > Looks like Dan Friedman, William Byrd and the IU Googlers they know might > be getting behind our application as vouchers. > > There's no better time to submit proposals or

Re: Serializing ClojureScript data structures

2012-03-02 Thread Chris McBride
Ok Thanks On Mar 2, 11:19 am, David Nolen wrote: > pr-str will do what you want. That said we should probably add toString > methods to the core datatypes to prevent this surprise. > > David > > > > > > > > On Fri, Mar 2, 2012 at 11:14 AM, Chris McBri

Serializing ClojureScript data structures

2012-03-02 Thread Chris McBride
In Clojure (str {:a 1}) returns "{:a 1}". In ClojureScript (str {:a 1}) returns "[Object object]". As a result, in order to send data to and from the server I've been doing this: (goog.json/serialize (cljs->js x)). This seems like unnecessary overhead to convert everything a JS object first, is th

Re: Bret Victor's live editable game in ClojureScript

2012-02-29 Thread Chris Granger
s the code in the current scope, so it doesn't matter how large your project may be. Based on what I've heard so far, my implementation is actually more real than what Victor himself created and does everything except for the slider/color-picker in his demo. Cheers, Chris. On Feb 28,

Is it possible to run the ClojureScript compiler in browser via a Java Applet?

2012-02-28 Thread Chris McBride
I saw Chris Granger's recent post on hackernews sparked some debates about the merit of being able to compile the language in-browser for dev purposes. Since the compiler is written in Clojure, would this be easy to accomplish via a java applet? Sort of like this scheme REPL (http:/

Bret Victor's live editable game in ClojureScript

2012-02-27 Thread Chris Granger
Hey folks, In reference to the previous thread on "Inventing On Principle", I built a ClojureScript example of his live editable game :) http://www.chris-granger.com/2012/02/26/connecting-to-your-creation/ Enjoy! Cheers, Chris. -- You received this message because you are subscri

Re: ClojureScript "use" statement not working

2012-02-25 Thread Chris McBride
Thanks, Also, having a line number that corresponds to my source would be helpful. On Feb 25, 4:41 pm, Cedric Greevey wrote: > On Sat, Feb 25, 2012 at 4:04 PM, Mark Rathwell > wrote: > > You must (:use ... :only ...) with ClojureScript > > "nth not supported on this type: Symbol" is not a very

ClojureScript "use" statement not working

2012-02-25 Thread Chris McBride
I have a namespace statement like this: (ns alephtest.websocket (:require [alephtest.js-utils :as util])) If I change this to: (ns alephtest.websocket (:use alephtest.js-utils)) I get this stack trace from the cljsbuild plugin (it took me a while to figure what was causing this): java.lang

ClojureScript + Overtone

2012-02-20 Thread Chris Granger
-clojurescript/ Cheers, Chris. -- 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 from

Re: newline question

2012-02-07 Thread Chris Perkins
http://stackoverflow.com/questions/8707679/how-to-get-suppress-m-characters-in-my-clojurebox-emacsw32-repl-connected-to -- 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

Re: Creating parsers in clojure

2012-02-03 Thread Chris Perkins
There is an example of parser for a very small subset of SQL in one of the unit tests for imparsonate, here: https://github.com/grammati/imparsonate/blob/master/test/imparsonate/test/core.clj - Chris -- You received this message because you are subscribed to the Google Groups "Cl

Re: Looking for parser generator library

2012-01-28 Thread Chris Perkins
Here is one I wrote a while ago. https://github.com/grammati/imparsonate It's not "finished" (is open-source software ever really finished?), so I don't know whether it will do what need it to. - Chris -- You received this message because you are subscribed to the Go

Re: ClojureScript def, vars, and binding

2012-01-27 Thread Chris Perkins
You should be calling Thread.start in the clojure version, not Thread.run. Your set-timeout is just blocking for a while and then running the passed-in function on the caller's thread. - Chris -- You received this message because you are subscribed to the Google Groups "Clojure&

Re: Implementing an interface with core/proxy results in UnsupportedOperationException

2012-01-23 Thread Chris Perkins
You may want to dig a little deeper into why reify was not working for you. As far as I can tell, the classes created by reify do have a public, no-arg constructor, as you require: user> (-> (reify Runnable (run [_])) type .getConstructors seq) (# #) - Chris -- You received this m

Re: Pretty-print with metadata

2012-01-20 Thread Chris Perkins
Good catch! I was about to add this to my personal toolkit of "generally useful random crap" (every programmer has one of those, right?). I'll make sure to cover that edge-case. Thanks. - Chris -- You received this message because you are subscribed to the Google Groups &quo

Re: Pretty-print with metadata

2012-01-20 Thread Chris Perkins
:bar, :attrs {}, :content [], :uri "http://aaa/"} ^{:xmlns {"a" "http://aaa/"}} {:tag :blah, :attrs {^{:prefix "a"}[:x "http://aaa/";] "y"}, :content [], :uri nil}], :uri nil} nil user> Works great! Tom F. is officially my clo

<    1   2   3   4   5   6   >