Re: Libraries and build management hell

2011-07-30 Thread Sean Corfield
On Sat, Jul 30, 2011 at 5:27 PM, Mark Engelberg wrote: > I guess what I'm > thinking of is that 95% of the time when I go to start something new, > it ends up being for a short-lived task Sounds like both Phil and I tackle that by having one or more scratch projects that we just add new dependenc

Re: Clojurescript - Javascript constructor and namespace with the same name problem

2011-07-30 Thread Chris Granger
FWIW, one work around for this is to include the sub-namespace as well and reference it from that one. So in your example: (ns notepad (:require [goog.dom :as dom] [goog.ui :as ui] [goog.ui.Zippy :as Zippy])) (ui/Zippy. "ttt" "sss") On Jul 28, 7:41 am, Marko Kocić wrote: > Hi

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

2011-07-30 Thread Ken Wesson
On Sat, Jul 30, 2011 at 10:22 PM, Luc Prefontaine wrote: > I would add that I want to see Rich maintain is grip on the Clojure wheel for > a very long time. > > Consensual decisions are most of the time not the best. They are the result > of compromises not based on technical arguments but on peo

Re: Libraries and build management hell

2011-07-30 Thread Ken Wesson
On Sat, Jul 30, 2011 at 10:58 AM, Mark Rathwell wrote: > > I'm all for a better, easier solution that is better in most ways.  What I'm > saying is: > 1. I don't want to go back to downloading jar files from the websites of all > of the libraries I want to use in a project and tracking different v

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

2011-07-30 Thread Luc Prefontaine
On Sat, 30 Jul 2011 11:02:13 -0400 +1 I would add that I want to see Rich maintain is grip on the Clojure wheel for a very long time. Consensual decisions are most of the time not the best. They are the result of compromises not based on technical arguments but on people's feelings or political

Re: dynamically generated let bindings

2011-07-30 Thread Ken Wesson
On Sat, Jul 30, 2011 at 9:07 PM, Alan Malloy wrote: > (get :foo argmap__5673__auto 42) is the right way to solve this > problem. Is another way to solve it, yes, and a good one. > Or if, as in the current example, you want to destructure a map with > lots of defaults, simply: > > (let [{:keys [f

Re: Problem with ClojureScript and Node.js

2011-07-30 Thread Benny Tsai
Thank you for tracking it down and doing the legwork, Anthony :) On Thursday, July 28, 2011 5:50:37 PM UTC-6, Anthony Grimes wrote: > > Oh! I apologize. I was replying via the google interface and didn't realize > it wasn't quoting. Here is a link to the topic for context: > https://groups.googl

Re: Clojure 1.3 Beta 1

2011-07-30 Thread Mark Engelberg
On Fri, Jul 29, 2011 at 10:09 AM, abedra wrote: > Can you provide a couple of concrete examples for this?  I will make > the ticket in JIRA and start working on it, but I am spread thin on > quite a few things at the moment and these examples will help a lot. > > Cheers, > > Aaron Bedra Sure, let

Re: dynamically generated let bindings

2011-07-30 Thread Alan Malloy
On Jul 29, 2:02 pm, Ken Wesson wrote: > (fn [& args] >   (let [argmap__5673__auto (#'some-ns/parse-args args) >         foo (or (:foo argmap__5673__auto) 42) >         bar (or (:bar argmap__5673__auto) nil) >         ...] >     (body goes here))) > where you define a private parse-args function in

Re: dynamically generated let bindings

2011-07-30 Thread Ken Wesson
On Sat, Jul 30, 2011 at 7:29 AM, Sam Aaron wrote: >> (fn [& args] >>  (let [foo (some logic goes here) >>        bar (some logic goes here) >>        ...] >>    (body goes here))) > > I just finished implementing a solution and it looks exactly like this. > You're absolutely right - this is preci

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

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

Re: Possible Issue with Listing 11.5 from the "Joy of Clojure"

2011-07-30 Thread Ken Wesson
On Sat, Jul 30, 2011 at 12:10 AM, Julien Chastang wrote: > By the way, I still think you need a lock in the count function in the > case where the caller tries to invoke the count function on a > partially constructed object. I don't think that's possible in this case. As far as code running on t

Re: Libraries and build management hell

2011-07-30 Thread Mark Engelberg
On Sat, Jul 30, 2011 at 10:43 AM, Sean Corfield wrote: > On Sat, Jul 30, 2011 at 8:24 AM, Mark Engelberg > wrote: >> 95% of the time, I just want to open a >> file, write some Clojure code, and interactively test it in a REPL. > > Really? Genuine question. You're probably right that by *time*, I

Re: ClojureScript on Windows

2011-07-30 Thread Benny Tsai
Brenton, thank you for your efforts! I noticed that in the current .bat files, CLASSPATH is directly modified and over-written. Perhaps they should instead use CLJSC_CP like the sh scripts? On Saturday, July 30, 2011 10:10:03 AM UTC-6, Brenton wrote: > > The problems with paths on Windows have

Re: Possible Issue with Listing 11.5 from the "Joy of Clojure"

2011-07-30 Thread pmbauer
"Please post all Errors and Corrections here" http://www.manning-sandbox.com/thread.jspa?threadID=41321&tstart=0 On Friday, July 29, 2011 9:10:00 PM UTC-7, Julien Chastang wrote: > > Thanks for your in-depth analysis. > > In conclusion, the 11.5 listing is broken specifically with the > reificat

Re: Libraries and build management hell

2011-07-30 Thread Phil Hagelberg
On Sat, Jul 30, 2011 at 8:24 AM, Mark Engelberg wrote: > And yes, there are certain libraries I tend to use, and I want them to > always be available.  Right now, for every file I want to tinker with, > I have to do lein new make-up-some-project-name.  Then I have to go in > and edit the project.c

Re: Including additional js in clojurescript compilation

2011-07-30 Thread Brenton
Any Google Closure compliant JavaScript can be pulled into the build process by using the :libs option. For example: (build src {:libs ["/foo/bar"]}) would include any JavaScript files under /foo/bar in the build process. On Jul 30, 7:02 am, David Powell wrote: > The closure-template tools let

Re: ClojureScript Presentation - video

2011-07-30 Thread Jeff Heon
I've subscribe to the Blip.tv itunes feed and it makes it really easy to download the blip.tv videos in iTunes and transfer them to iPod/ iPad. You can search for Clojure on the iTunes store Podcasts section and subscribe. Or you can go in iTunes Advances Menu / Subscribe to Podcast and use this

Re: Libraries and build management hell

2011-07-30 Thread Sean Corfield
On Sat, Jul 30, 2011 at 7:58 AM, Mark Rathwell wrote: > Maybe a Clojure installer for > Mac/Windows/Linux, that installs a clj executable on the path This was actually how I started with Clojure on Mac OS X (I think the project was Clojure-MacOSX or something like that) but I quickly found it was

Re: ClojureScript Presentation - video

2011-07-30 Thread Bill Robertson
blip.tv is still wrapped around a tree. I've tried several times over the last several days. I tried a few random other videos too, but no luck. Trying to get the avi to play on the mac... -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

Re: Good book on migrating from (Java) OO to FP

2011-07-30 Thread Matthias Cords
not sure wheret it applies to your requirements: www.gigamonkeys.com/book On 29 July 2011 14:03, Colin Yates wrote: > Hi all, > > Not sure whether this is good etiquette or not, but I wanted to praise > http://oreilly.com/catalog/0636920021667. I found it pretty useful in > bridging the gap b

Re: ClojureScript on Windows

2011-07-30 Thread Brenton
The problems with paths on Windows have been fixed and ClojureScript now has batch files for cljsc, repl, and repljs. There is also a page in the wiki to help Windows users get started. https://github.com/clojure/clojurescript/wiki/Windows-Setup Support for Windows will come from the community so

Re: Libraries and build management hell

2011-07-30 Thread Michal B
On Saturday, July 30, 2011 6:24:50 PM UTC+3, puzzler wrote: > > The issue I have with the build tools is that they all presume > you want to *build* something. 95% of the time, I just want to open a > file, write some Clojure code, and interactively test it in a REPL. > Exactly what I'm talking ab

Re: Java object field access

2011-07-30 Thread .Bill Smith
Oh sorry, I saw the title and thought "bean access" rather than "field access". Obviously the code I posted relies on the presence of setters rather than fields. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to c

Re: Libraries and build management hell

2011-07-30 Thread Lee Spector
On Jul 30, 2011, at 11:24 AM, Mark Engelberg wrote: > I would love to have a more streamlined way in Clojure for my personal > common case -- writing a short script and using it interactively. +1 on the whole perspective presented here, most of which I cut. -Lee -- You received this message b

Re: Libraries and build management hell

2011-07-30 Thread Mark Engelberg
On Sat, Jul 30, 2011 at 7:58 AM, Mark Rathwell wrote: > One thing, though, is new users coming from Python/Ruby/etc really do seem > to have a hard time adjusting to the fact the standard is not to have a > Clojure installation, with a clj executable that you run scripts through, > and with global

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

2011-07-30 Thread daly
Try to see the situation from the lead developer perspective (e.g. Rich's perspective). I have been through the "head-punching", as you call it and I don't want to put words in Rich's mouth but I do see things differently. To lead a project you need to make design choices. To make those design c

Re: Libraries and build management hell

2011-07-30 Thread Mark Rathwell
I'm all for a better, easier solution that is better in most ways. What I'm saying is: 1. I don't want to go back to downloading jar files from the websites of all of the libraries I want to use in a project and tracking different versions, no matter how large or small the project is, as suggeste

Re: Libraries and build management hell

2011-07-30 Thread David Nolen
On Sat, Jul 30, 2011 at 5:31 AM, Michal B wrote: > > Instead of iterating what's available today and how much better it makes > things (I know), I hope we can question our assumptions about how things are > and get a discussion going on how to make things better. If not for > simplicity, do it fo

Re: Good book on migrating from (Java) OO to FP

2011-07-30 Thread Kenny Stone
Dean gave a talk at Windy City Rails a few years ago that opened this (ruby) programmer's eyes to functional programming. I haven't read the book, but he's a very good educator. Kenny On Sat, Jul 30, 2011 at 12:03 AM, Sean Corfield wrote: > On Fri, Jul 29, 2011 at 5:03 AM, Colin Yates > wrote:

Re: Defrecord and Interfaces..

2011-07-30 Thread Andreas Liljeqvist
On a related note... If I have something like this: (defn make-archive [] (Archive. )) (defrecord Archive [] java.io.Closeable (close [_] (print "first try"))) user> (.close (make-archive)) first try (defrecord Archive [] java.io.Closeable (close [_] (print "second try"))) user> (

Re: dynamically generated let bindings

2011-07-30 Thread Sam Aaron
Hi Ken, On 29 Jul 2011, at 22:02, Ken Wesson wrote: >> P.S. Thanks everyone for your help so far. My brain is overheating but I am >> learning a lot. > > You're welcome. > > To do what you're proposing you will probably need the emitted > function to look like: > > (fn [& args] > (let [foo (s

Including additional js in clojurescript compilation

2011-07-30 Thread David Powell
The closure-template tools let you take a template, and pre-process it to something like: hello3.soy.js: goog.provide('example.templates'); goog.require('soy'); goog.require('soy.StringBuilder'); [...] example.templates.welcome = function(opt_data, opt_sb) { [...] In my clojurescript, I can put

Re: Possible Issue with Listing 11.5 from the "Joy of Clojure"

2011-07-30 Thread Julien Chastang
Thanks for your in-depth analysis. In conclusion, the 11.5 listing is broken specifically with the reification of the seq function. The problem is that the seq function allows the array reference to escape in an unsafe manner. The issue is concurrency as well as visibility. As you suggest, the onl

ClojureScript binding problem

2011-07-30 Thread Brian McKenna
In JavaScript, the `this` identifier gets "bound" when a function is called. Determining what to bind is from either: * Looking up the object that the function was called from * An explicit parameter in these functions: * `Function.prototype.apply` * `Function.prototype.call` So the followin

Re: Libraries and build management hell

2011-07-30 Thread Michal B
This discussion is getting a lot of "What are you talking about? Leiningen is what you're looking for!" replies. I know. I'm a happy lein user, and use it and clojars frequently with some of my larger projects. I'm very grateful for the work Phil and the other contributors

Re: better community docs: getting started

2011-07-30 Thread Laurent PETIT
2011/7/30 nchurch > > > But my question is : is it ready yet ? > > As a quick and simple way to get a REPL and edit code it seems to work > fine. I added a sentence about its newness just so people would be > aware of it... OK. I can really see it fill in the gaps, as I said above, it has inde

Re: Defrecord and Interfaces..

2011-07-30 Thread Andreas Liljeqvist
Thanks, that was very informative. I got no technical reason to expect that implementing an interface would define a function, lets just say that it felt right :/ 2011/7/29 Aaron Cohen > On Fri, Jul 29, 2011 at 3:18 PM, Andreas Liljeqvist wrote: > >> Is this a bug? >> >> > Nope, expectation dis

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

2011-07-30 Thread Alexander Yakushev
The moment I saw the previous controversial topic - about "yes language" push - I realized that Clojure has become mature. When the people who do not agree with some choices appear not just outside but in the community itself - it means that the language matters to them despite the parts they don't

Re: ClojureQL: consistent select queries?

2011-07-30 Thread Sean Corfield
On Fri, Jul 29, 2011 at 11:56 PM, László Török wrote: > thanks for the pointer, I thought clojure.java.jdbc is 1.3 only. :) I suspect a lot of ppl think the new contrib libraries are 1.3 only but Clojure/core made it clear to me that new contrib libraries are all supposed to be 1.2 compatible. Th