Microsoft SQL Server and the sql contrib

2008-12-16 Thread Scott Jaderholm
I'm trying to use the sql contrib with Microsoft SQL Server Express 2005.

1. I've included sqljdbc.jar in my classpath.

2. In my namespace I (:require [clojure.contrib.sql :as sql])

3. I'm defining my database connection as follows:

(def db {:classname "com.microsoft.sqlserver.jdbc.SQLServerDriver"
  :subprotocol "sqlserver"
  :subname "//sqlserver\\sqlexpress" ; this is hostname and instance
name. I've tried just //sqlserver and sqlserver also
  :user "username"
  :password "password"
  })

 4. But when I try to access the database:
(sql/with-connection db
  (sql/with-results res
"select * from exercises"
(doseq rec res
  (println rec

5. I get the following error:
No suitable driver found for jdbc:sqlserver://sqlserver\sqlexpress
  [Thrown class java.sql.SQLException]

Restarts:
 0: [ABORT] Return to SLIME's top level.

Backtrace:
  0: java.sql.DriverManager.getConnection(Unknown Source)
  1: java.sql.DriverManager.getConnection(Unknown Source)

Can anyone help?

Thanks!
Scott

--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: Microsoft SQL Server and the sql contrib

2008-12-16 Thread Scott Jaderholm
I don't think that's a problem:
user> (. Class (forName "com.microsoft.sqlserver.jdbc.SQLServerDriver"))
com.microsoft.sqlserver.jdbc.SQLServerDriver


On Tue, Dec 16, 2008 at 12:21 PM, MikeM wrote:

>
> To make sure your driver is really on the classpath, try this from the
> REPL:
>
> (. Class (forName  "com.microsoft.sqlserver.jdbc.SQLServerDriver"))
>
>
> >
>

--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: Microsoft SQL Server and the sql contrib

2008-12-17 Thread Scott Jaderholm
Thanks for the idea. Although those are definitely necessary steps,
unfortunately the problem still persists.

On Tue, Dec 16, 2008 at 5:47 PM, Wayne R  wrote:

>
> Have a look at
> http://dertompson.com/2007/10/06/connection-to-mssql-server-express-2005-with-jdbc/
>
> Apparently using JDBC with MSSQL Express requires some extra setup.
>
>
> On Dec 16, 3:49 pm, "Scott Jaderholm"  wrote:
> > I don't think that's a problem:
> > user> (. Class (forName "com.microsoft.sqlserver.jdbc.SQLServerDriver"))
> > com.microsoft.sqlserver.jdbc.SQLServerDriver
> >
> > On Tue, Dec 16, 2008 at 12:21 PM, MikeM  >wrote:
> >
> >
> >
> > > To make sure your driver is really on the classpath, try this from the
> > > REPL:
> >
> > > (. Class (forName  "com.microsoft.sqlserver.jdbc.SQLServerDriver"))
> >
>

--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: What profilers are you using?

2009-03-12 Thread Scott Jaderholm
On Sat, Feb 7, 2009 at 8:16 AM, David Powell  wrote:

>
> Newer versions of JDK 1.6, eg Update 11, have an application called
> 'jvisualvm' in the bin directory. It lets you attach to any running
> Java process and it has a profiler that you can switch on at runtime.


If you're starting Clojure from inside Emacs under Windows then you might
have trouble connecting to it with VisualVM. Start Clojure from outside
emacs, connect to it using slime, and VisualVM should work fine.

--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: PeepCode screencast

2009-04-24 Thread Scott Jaderholm
Thanks Phil! I just bought it and look forward to watching it this weekend.

Are you planning something more advanced?

On Fri, Apr 24, 2009 at 11:03 AM, Phil Hagelberg  wrote:

>
> I'm proud to announce that the "Functional Programming with Clojure"
> PeepCode screencast has just been published:
>
> http://peepcode.com/products/functional-programming-with-clojure
>
> It's a professionally-produced 65-minute video that introduces all the
> foundational concepts of Clojure by stepping through the creation of a
> multiplayer text adventure game. If you've been looking for a quick
> way to get up to speed on Clojure, this is your ticket.
>
> The screencast is sold for $9, and there's a preview available:
>
> http://peepcode.com/system/uploads/2009/peepcode-clojure-preview.mov
>
> Hope you like it!
>
> -Phil Hagelberg
>
> http://technomancy.us
>
> >
>

--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



[ANN] units.clj - unit conversion functions without repeating yourself

2010-01-14 Thread Scott Jaderholm
Hi,

I created a library that provides unit conversion functions[1] for
several common units and allows you to define new units conversions
with a single equation.

The library does a few interesting things automatically:

First, if you define inches-to-feet, it will create feet-to-inches for you.
Second, if you define inches-to-feet and feet-to-meters, it will
create inches-to-meters and meters-to-inches for you.
Third, it will create the equivalent square and cubic functions as well.

So for inches, feet, yards, meters, centimeters, millimeters, miles,
and kilometers, if you specify 7 equations this library will define
168 conversion functions for you (56 each for length, area, and
volume).

The code is at http://gist.github.com/276662#file_units.clj

I'd love to receive feedback.

Thanks,
Scott

Notes
[1] For a reliable alternative, see JScience.org
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: --> macro proposal

2010-07-06 Thread Scott Jaderholm
On Tue, Jul 6, 2010 at 3:24 PM, Greg  wrote:

> > This would be most likely java interop, ie. ->.
> > There the main arguments are 99% of the times the first or the last ones.
> So -> or ->> will work
>
> OK, so what happens when one of the functions takes it in the front, and
> the other in the back?
>
> Or what happens when you're using a piece of code that doesn't follow
> either convention? Are you saying such code doesn't exist?
>
> In both those cases, -> and ->> become useless.
>
>
You can use -> and ->> together to handle changing argument orders.

(-> "foo"
(str "1")
(->> (conj #{})))

Scott

(I would like --> or let-> in contrib though)

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: --> macro proposal

2010-07-06 Thread Scott Jaderholm
On Tue, Jul 6, 2010 at 3:37 PM, Scott Jaderholm  wrote:

>
> On Tue, Jul 6, 2010 at 3:24 PM, Greg  wrote:
>
>> > This would be most likely java interop, ie. ->.
>> > There the main arguments are 99% of the times the first or the last
>> ones. So -> or ->> will work
>>
>> OK, so what happens when one of the functions takes it in the front, and
>> the other in the back?
>>
>> Or what happens when you're using a piece of code that doesn't follow
>> either convention? Are you saying such code doesn't exist?
>>
>> In both those cases, -> and ->> become useless.
>>
>>
> You can use -> and ->> together to handle changing argument orders.
>
> (-> "foo"
> (str "1")
> (->> (conj #{})))
>
> Scott
>
> (I would like --> or let-> in contrib though)
>

Sorry, this was just in response to "what happens when one of the functions
takes it in the front, and the other in the back?" not "what happens when
you're using a piece of code that doesn't follow either convention?", which
would have to use #().

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Any Clojure2js Libraries?

2010-07-08 Thread Scott Jaderholm
Clojurescript is the only thing I know of like scheme2js. There are a
couple parenscript like programs, the best being
http://github.com/arohner/scriptjure

Scott



On Thu, Jul 8, 2010 at 1:17 PM, Tim Robinson  wrote:
> All I got from google was Clojurescript, but I'm wondering what
> options are out there.
>
> I was looking for something like scheme2js[1] only in Clojure.
>
> Thanks,
> Tim
>
> [1] http://www-sop.inria.fr/mimosa/scheme2js/
>
>
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Elisp for highlighting java method names in slime inspector

2010-08-17 Thread Scott Jaderholm
It's always bothered me that when inspecting a class in Slime the
method names are highlighted in the same color as public static int
etc. I think it makes it hard to see what methods are available.

I wrote this elisp that highlights the method names in a different color:

(add-hook 'slime-inspector-mode-hook
  (lambda ()
    (font-lock-add-keywords nil '(("\\(\\w+\\)(" 1
   font-lock-function-name-face)

Unfortunately it causes the other highlighting to stop working. If you
know why or have a better regex feel free to respond.

Scott

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


clojure.contrib.trace not working on 1.2?

2010-09-07 Thread Scott Jaderholm
Why does c.c.trace give different output on 1.2 than it did on 1.1?

>From 
>http://learnclojure.blogspot.com/2010/02/slime-2009-10-31-user-defn-fib-n-if-n-2.html

On 1.1

user> (dotrace (fib) (fib 3))

TRACE t1880: (fib 3)
TRACE t1881: |(fib 2)
TRACE t1882: ||(fib 1)
TRACE t1882: ||=> 1
TRACE t1883: ||(fib 0)
TRACE t1883: ||=> 0
TRACE t1881: |=> 1
TRACE t1884: |(fib 1)
TRACE t1884: |=> 1
TRACE t1880: => 2
2
user>

On 1.2

user> dotrace (fib) (fib 3))

TRACE t11624: (fib 3)
TRACE t11624: => 2

Thanks,
Scott

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: clojure.contrib.trace not working on 1.2?

2010-09-08 Thread Scott Jaderholm
On Wed, Sep 8, 2010 at 7:30 AM, Mark Nutter  wrote:
> I seem to recall that 1.2 is using "chunked" lazy sequences for
> performance reasons, and fib is a lazy sequence. I wonder if you'd
> start seeing intermediate steps using (fib 20) instead of (fib 3)?

This fib doesn't look lazy to me so I don't think that's it.

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ANN: Clojure Cookbook

2010-09-27 Thread Scott Jaderholm
Daniel,

If you install lein-search (http://clojars.org/lein-search or
http://github.com/Licenser/lein-search) you can do searches like that.

lein search mail

If you put it in ~/.lein/plugins it will work for all your lein projects and
you can even use it to add what you find to your project.clj and to go
through all your dependencies and prompt whether your want to update.


Scott


On Mon, Sep 27, 2010 at 10:01 AM, Daniel Pittman wrote:

> Tim Daly  writes:
>
> > There is a movement afoot in the common lisp community to implement
> > quicklisp which is similar to the perl cpan site or debian. It would be
> > useful if there was a quicklisp (or asdf) for Clojure. Thus you could
> > "apt-get" a library for clojure.
>
> FWIW, having just started out playing with Clojure with a view to building
> a
> Google App Engine web service — and from a Perl and Debian background:
>
> The single biggest thing that I have missed has been 'lein search' or so,
> which would allow me to search an index of the modules it can access and
> tell
> me what is available for meeting my current need.
>
> The second biggest is the lack of a CPAN-alike central service on the web
> that
> would allow me to do the same, plus review the documentation for candidate
> libraries.
>
> So, um, that would be nice. :)
>
>Daniel
> --
> ✣ Daniel Pittman✉ dan...@rimspace.net☎ +61 401 155
> 707
>   ♽ made with 100 percent post-consumer electrons
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Looking for more affordable sleeping options for clojure-conj

2010-09-28 Thread Scott Jaderholm
Hey guys,

I'm looking for one of the following more affordable sleeping options at
clojure-conj (Thu, Fri, and Sat nights):

1) Someone willing to gift or rent space for an air mattress in their room.

2) Someone with a king w/ sofa bed room willing to rent out the sofa bed.

3) Someone interested in splitting one of the rooms with two double beds.

4) Someone who lives close by willing to let me {sofa, air mattress}

Thanks,
Scott

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Find file from namespace symbol

2010-09-29 Thread Scott Jaderholm
swank.commands.basic> (find-ns-definition 'clojure.set)
(("clojure.set" (:location (:zip
"/home/scott/project/lib/clojure-1.2.0-master-20100813.160144-94.jar"
"clojure/set.clj") (:line 1) nil)))

Scott


On Wed, Sep 29, 2010 at 6:34 PM, Jeff Valk  wrote:

> On Wed, 29 Sep 2010 at 15:18, David Jagoe wrote:
>
> > Anyone know of a utility that returns a absolute filename given a
> > namespace symbol?
>
> If you're using Emacs/SLIME, you could use swank-clojure's classpath
> browsing information. The var "available-classes" in namespace
> "swank.util.class-browse" holds clojure namespaces and java classes on the
> classpath as a list of maps.
>
> For example to see where the clojure.set namespace comes from:
>
> user> (clojure.pprint/pprint
>   (filter #(= (:name %) "clojure.set")
>   swank.util.class-browse/available-classes))
>
> ({:loc "/home/jeff/.clojure/clojure-1.3.0-alpha1.jar",
>  :file "clojure/set__init.class",
>  :name "clojure.set"})
>
> The same applies to java classes:
>
> user> (clojure.pprint/pprint
>   (filter #(= (:name %) "java.net.Socket")
>   swank.util.class-browse/available-classes))
>
> ({:loc "/usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar",
>  :file "java/net/Socket.class",
>  :name "java.net.Socket"})
>
> The map keys are as follows:
>  :name  Java class or Clojure namespace name
>  :loc   Classpath entry (directory or jar) on which the class is located
>  :file  Path of the class file, relative to :loc
>
> Also see: (doc swank.util.class-browse)
>
> Hope this helps!
>
> - Jeff
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: lispy ways of handling dev mode

2010-10-02 Thread Scott Jaderholm
On Sat, Oct 2, 2010 at 6:36 PM, Michael Ossareh  wrote:

> What is the recommended manner in which to let your application know its on
> a dev machine?
>

I use an environment variable that determines which config (dev, production,
test) gets loaded.

APPNAME_CONFIG=development lein swank

I don't know if it has issues in war deployments or such, I haven't done
them. If someone knows of problems with this approach I'd be curious to hear
them.

Scott

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: ANN: funkyweb 0.1.0 - The clojure webframework with route inference

2010-10-06 Thread Scott Jaderholm
Very nice. I really love the docs. Covers how to use almost everything with
plenty of example code and short descriptions.

I like variadic args, type hints.

Doesn't cover how to test a handler (from code) and see response.

Maybe move query-string request docs up to where query-string params
introduced.

I like integer and vector returns.

I'd like cookies-set to take :expires :never so user doesn't have to write a
far future date out in that special format.

Wondering about lack of compojure style request destructuring in route. Does
(request-get) return the request that you then destructure in a let in your
action?

Cheers,
Scott


On Wed, Oct 6, 2010 at 3:30 AM, Patrik Hedman wrote:

> I'm pleased to announce the 0.1.0 release of funkyweb, my ring based
> clojure webframework.
>
> It provides the following main abstractions:
>
> Controller: Controllers work somewhat like namespaces in that they define
> the base of the route so any actions defined under a controller will have
> routes generated that starts with the controller name.
>
> Action: Actions looks like functions in that they take a name an argument
> list and a body and they generates routes and url helper functions based on
> their name and arguments.
>
> More information can be found in the readme included with the source code
> at http://github.com/pmh/funkyweb
>
> I would love to hear what you think about it.
>
>
> - Patrik
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Applying collection of functions

2011-04-07 Thread Scott Jaderholm
(map #((apply comp (reverse fs)) %) c)
=> (11 21 31)
Scott


On Thu, Apr 7, 2011 at 4:51 AM, zm  wrote:

>
> Hi,
>
> Given a collection of functions
>
> (def fs [#(* % 10) #(+ % 1)])
>
> and some numbers
>
> (def c [1 2 3])
>
> How do I apply all the functions to c so that the results of one
> function are passed to the other. In the same way -> works. Thus in
> this case the expected result would be: 11 21 31
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Aw: Re: Aw: Which Clojure environments support arglist-on-space?

2011-06-06 Thread Scott Jaderholm
You mean in addition to Emacs right? Of course emacs with slime does this.
If you use autodoc then you don't even have to press space, the arglists
will update in the echo area as you move the cursor around source.

See http://www.youtube.com/watch?v=lf_xI3fZdIg

As for showing args of functions in arg position, if you're in an apply form
it will show the args for the function being applied.

Cheers,
Scott


On Mon, Jun 6, 2011 at 1:35 PM, Lee Spector  wrote:

>
> On Jun 6, 2011, at 12:04 PM, Meikel Brandmeyer wrote:
> >> Am Montag, 6. Juni 2011 17:53:37 UTC+2 schrieb Lee:
> >> I don't think automatic insertion would be a good thing, BTW.
> > There are for example several snippet plugins for Vim in the wild, which
> do exactly that. And things like textmate also advertise such functionality
> (inserting snippets), AFAIK. That said, I'm not sure it's a good idea
> either. There are a tick too many edge-cases for my taste. If at all, it
> would be possible to turn this off.
>
> Granted, snippet pasting tools may be useful, but I guess my response
> should just have been to clarify that this isn't what I meant by
> artlist-on-space. The beauty of the arglist-on-space functionality that I
> know and love is that it is unobtrusive in its automatic helpfulness.
>
> Aside from the near miss with VimClojure (and its presence in MCLIDE) does
> this exist in other Clojure environments?
>
> Thanks,
>
>  -Lee
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Aw: Re: Aw: Which Clojure environments support arglist-on-space?

2011-06-06 Thread Scott Jaderholm
I don't know of a step by step guide that includes autodoc. You need an
older version of slime that includes the contrib autodoc (i.e. not
package.el version which lacks that contrib). I use 10-15-2009.

Scott


On Mon, Jun 6, 2011 at 4:38 PM, Lee Spector  wrote:

>
> On Jun 6, 2011, at 4:24 PM, Scott Jaderholm wrote:
>
> > You mean in addition to Emacs right? Of course emacs with slime does
> this. If you use autodoc then you don't even have to press space, the
> arglists will update in the echo area as you move the cursor around source.
> >
> > See http://www.youtube.com/watch?v=lf_xI3fZdIg
> >
> > As for showing args of functions in arg position, if you're in an apply
> form it will show the args for the function being applied.
>
> Wonderful. I didn't know for sure if this worked in Emacs with Clojure
> because I didn't get this in my own installation but I knew that my
> installation was at least half botched (on multiple occasions... so
> cumulatively it may have been more than half botched :-). Will one of the
> emacs/slime installation recipes that have been posted here reliably get me
> this functionality (including the autodoc part -- I don't know how to get
> that but it looks great)? Is there one you'd point to in particular?
>
> Thanks so much!
>
>  -Lee
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Aw: Re: Aw: Which Clojure environments support arglist-on-space?

2011-06-06 Thread Scott Jaderholm
if you follow the instructions on swank-clojure readme then yes I think you
get that.
Scott


On Mon, Jun 6, 2011 at 5:08 PM, Lee Spector  wrote:

>
> On Jun 6, 2011, at 4:58 PM, Scott Jaderholm wrote:
>
> > I don't know of a step by step guide that includes autodoc. You need an
> older version of slime that includes the contrib autodoc (i.e. not
> package.el version which lacks that contrib). I use 10-15-2009.
>
> Thanks for the pointers, although winging an installation process using old
> versions of things is not something that I want to deal with... However, if
> I ignore the autodoc part and go with one (any?) of the emacs/slime
> installation recipes that have been posted here (and if all goes well this
> time) then I should end up with arglist-on-space?
>
>  -Lee
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Other way to express (((m2) 2) 1)?

2011-06-29 Thread Scott Jaderholm
(defmacro ->f
  "like -> but f is threaded at pos 0 instead of 1"
  ([f] f)
  ([f x] `(~f ~x))
  ([f x & more]
 `(->f (~f ~x) ~@more)))


(->f m 2 2 1)

Scott



On Wed, Jun 29, 2011 at 7:00 PM, Antonio Recio  wrote:
> Is there other way to express (((m2) 2) 1)?
> (def m [1 2 [21 22 [221 222 223] 23] 3])
> (((m 2) 2) 1)
> ;-> 222
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Other way to express (((m2) 2) 1)?

2011-06-29 Thread Scott Jaderholm
Here's another, perhaps very controversial, solution:

(in m.2.2.1)

;; in
(defn flexible-get
  ([map key]
 (or (let [k (read-string key)]
   (and (number? k)
(get map k)))
 (get map (keyword key))
 (get map (name key
  ([map key & more]
 (apply flexible-get (flexible-get map key) more)))

(defn lookup-symbol? [x]
  (and (symbol? x)
   (.contains (name x) ".")
   (not (.endsWith (name x) "."))
   (not (.startsWith (name x) "."

(defmacro in
  "allows dot map key access. ex: (in (let [a {:b 1 \"c\" 2}] (+ a.b
a.c))) => 3 "
  [& forms]
  `(do ~@(postwalk (fn [x]
 (if (lookup-symbol? x)
   (let [[map & keys] (.split (str x) "\\.")]
 `(flexible-get ~(read-string map) ~@keys))
   x))
   forms)))


Scott



On Wed, Jun 29, 2011 at 9:41 PM, Scott Jaderholm  wrote:
> (defmacro ->f
>  "like -> but f is threaded at pos 0 instead of 1"
>  ([f] f)
>  ([f x] `(~f ~x))
>  ([f x & more]
>     `(->f (~f ~x) ~@more)))
>
>
> (->f m 2 2 1)
>
> Scott
>
>
>
> On Wed, Jun 29, 2011 at 7:00 PM, Antonio Recio  wrote:
>> Is there other way to express (((m2) 2) 1)?
>> (def m [1 2 [21 22 [221 222 223] 23] 3])
>> (((m 2) 2) 1)
>> ;-> 222
>>
>> --
>> 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, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ANN: Hafni

2011-06-30 Thread Scott Jaderholm
In arrow.clj:

What is iarr an abbreviation for?

Perhaps a docstring on ||| would help, I'm having trouble understanding it.

Maybe add these examples, I found them helpful

((arr inc) 1)
;; 2

((>>> (arr inc) (arr dec)) 1)
;; 1

((flow (arr inc) >>> (arr inc) >>> (arr inc)) 1)
;; 4

((*** (arr inc)
  (arr dec))
 [1 1])
;; [2 0]

((&&& (arr inc)
  (arr dec))
 1)
;; [2 0]

((fst (arr inc)) [1 1])
;; [2 1]

Scott



On Mon, Jun 20, 2011 at 7:57 AM, Jonathan Fischer Friberg
 wrote:
> Hi,
>
> I figured that I would announce a library that I have been working on for a
> while now.
>
> It's called Hafni, and it's a swing wrapper. Why another swing wrapper?
> I wanted to solve the following problems:
>
> 1. There are a lot of boilerplate code needed.
>
> 2. Changes made to content is not very functional.
>
> 3. Changing content is (sometimes) annoyingly hard.
>
> To solve these problems, I looked into the very functional world of Haskell
> and found something called Functional reactive programming (FRP)[1][2] which
> has been used to solve problem 2 in gui programming for Haskell. To be able
> to program FRP, the datatype "arrow" was created (or maybe the other way
> around), and this is what Hafni uses. I wont go into detail here since it is
> not very easy to explain in a short mail, and there are a lot of resources
> out there on the subject (see the links).
>
> To be honest, when I first started programming on Hafni, I didn't know that
> there existed other swing wrappers for java (I guess I also wanted to try
> this myself, which meant that I didn't really search it out), but since they
> do exist, lets compare Hafni to the two I have seen on this mailing list:
> seesaw [3] and GUIFTW [4].
>
> 1. Hafni is strictly a swing wrapper and does not claim to be anything else.
>    Seesaw - aims to provide a ui library, "It happens to be built on Swing".
>    GUIFTW - "It's not tied to any GUI toolkit but instead front-ends for
> each can be written easily."
>
> 2. Hafni has facilities, but is not really interested in exactly how
> components look.
>    Seesaw - Doesn't really express an opinion about this, but seems to have
> a lot of facilities for making components look a certain way.
>    GUIFTW - "Style it in a CSS fashion"
>
> 3. When events happen, Hafni uses the "Event" and "arrow" datatypes to make
> things happen while both
>    seesaw and GUIFTW uses something that looks like
>    the standard java event function(s). It should be noted that Hafni
> event/arrows
>    behaves exactly like corresponding for seesaw and GUIFTW if no changes is
> made to content.
>
> The reason of 2 (which, in a way, leads to 3) is that when I wrote swing
> code manually, the parts
> that I were most annoyed with weren't to make things look as I wanted them,
> it was changing them.
>
> I haven't really looked into it exactly (or tried it), but it looks like
> seesaw and Hafni can be combined
> since seesaw deals directly with java objects (the "config!" function is
> especially interesting) [5].
>
> I would like to end this mail with an example of Hafni. This example is the
> same as in the Hafni readme.
>
> (frame :content (comp-and-events (button :text "*")
>   :act (flow (output-arr this :text) >>>
>  (arr #(str % "*")) >>>
> (input-arr this :text)))
> :size 200 200 :dont_exit_on_close)
>
> As it's already explained in the readme, let's look at the most interesting
> part:
>
> (flow (output-arr this :text) >>> (arr #(str % "*")) >>> (input-arr this
> :text))
>
> This code snippet says that the current text of the button created with
> (button :text "*") should "flow" to
> the function #(str % "*") which adds a "*" to the text, which should flow to
> the text of that same button.
> The result of this is that when the button is pressed, the text of that
> button is changed as follows:
> "*"
> "**"
> "***"
> ""
> etc ...
>
> And finally, the link to Hafni: https://github.com/odyssomay/Hafni
>
> ___
>
> I really hope that someone finds this project interesting, and at best even
> useful. ;)
>
> Questions, comments, ideas, critique?
>
> Jonathan
>
> 1. http://en.wikipedia.org/wiki/Functional_reactive_programming
> 2. http://www.haskell.org/haskellwiki/Functional_Reactive_Programming
> 3. https://github.com/daveray/seesaw
> 4. https://github.com/santamon/GUIFTW
> 5. http://daveray.github.com/seesaw/seesaw.core-api.html#seesaw.core/config!
>
> Additional links:
> http://www.haskell.org/haskellwiki/Arrow
> http://en.wikibooks.org/wiki/Haskell/Understanding_arrows
> http://www.haskell.org/arrows/
>
>
> --
> 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, send email to
> clojure+unsubscr...@g

Re: Clojure for large programs

2011-07-07 Thread Scott Jaderholm
On Thu, Jul 7, 2011 at 2:45 AM, Feng Shen  wrote:
> But lacking debuging and
> refactoring support is a pain.

In case you're not familiar with these (not saying they're full-featured):

https://github.com/pallet/ritz
http://www.youtube.com/watch?v=d_L51ID36w4

https://github.com/tcrayford/clojure-refactoring

Scott

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: clojurescript development workflow

2011-07-25 Thread Scott Jaderholm
On Mon, Jul 25, 2011 at 4:02 AM, Sam Aaron  wrote:

> Also, with respect to the lack of ability to interact with the browser
> directly through the REPL or editor like with emacs-swank-slime, is it fair
> to assume that this is just due to the current implementation being
> Rhino-based?


Perhaps ClojureScript repl could be hooked up to swank-js (similar to
mozrepl) to send the code to your browser (a specific page even) for
evaluation.
https://github.com/ivan4th/swank-js

Scott

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Example of a real-world ClojureScript web application

2011-08-10 Thread Scott Jaderholm
I haven't read the code yet but I have a few questions:
Do you miss backbone.js? Are you going to use it with cljs?
Have you shared any code between the frontend and backend? As in run the
same functions on both sides. If so, are you duplicating the code in both
.clj and .cljs or doing something else?
How has the debugging/error notification experience been?

Scott


On Tue, Aug 9, 2011 at 8:53 PM, Filip de Waard  wrote:

> I'm working on Vix, which is a document repository and content
> management system written in Clojure with a CouchDB backend. After the
> announcement on July 23 I immediately got excited about ClojureScript
> and the Google Closure toolkit, so I dropped the existing Backbone.js
> and jQuery code and rewrote all client-side functionality in
> ClojureScript. Despite (or maybe because of) the fact that the
> functionality is still very minimal I wanted to share this code as an
> example of ClojureScript in the wild.
>
> Be warned that:
> - this is not perfect, clean example code written by a ClojureScript
> expert (in several places I've used hacks and shortcuts to make things
> work), but hopefully at least a starting point for others working on
> similar functionality,
> - you should read the installation instructions carefully (e.g. there
> is still a hardcoded path in src/vix/db.clj at the time of this
> writing, which I hope to correct in the near future),
> - I'm actively developing this application, so things will change and
> new features will be added frequently,
> - the application isn't done yet, although it has a working prototype.
>
> I'm concentrating on adding features that will allow users to manage
> feeds (currently "blog" is the default feed), add media files like
> images and to manage users. I had trouble getting unit testing to work
> properly for the ClojureScript part of the application, so I
> grudgingly wrote it using a non-TDD approach. Retrofitting unit tests
> into the ClojureScript part is a priority. The user interface is also
> lacking some bells and whistles that I had previously implemented in
> jQuery, but still have to rewrite using Google Closure. Eventually, I
> want to turn Vix into a commercial SaaS offering, with a focus on
> performance (e.g. Amazon CloudFront support), scalability and webshop
> functionality. The application itself, however, will be perpetually
> available as open source software, because I'm committed to sharing my
> code.
>
> Here is the GitHub page for Vix: https://github.com/fmw/vix
>
> This is not a "launch post" for Vix, because we're not ready for
> supporting typical end-users yet, but I hope that the code will be
> useful to other developers in the meantime. I'm also happy to receive
> any feedback (positive as well as negative) and answer questions. You
> can reply to this post, but if you prefer to contact me privately you
> can also find my contact information on Github (https://github.com/
> fmw).
>
> Sincerely,
>
> F.M. (Filip) de Waard / fmw
>
> P.S. I'd like to thank the ClojureScript developers. There are
> surprisingly few glitches considering that the project has only just
> been released. The language is incredibly well designed and a pleasure
> to use. Thanks for making client-side development more enjoyable!
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Which emacs packages?

2012-03-12 Thread Scott Jaderholm
- Auto-complete & Ac-slime http://www.youtube.com/watch?v=kH0gOE7rj7g and
http://www.youtube.com/watch?v=dio__Qylp-s
- yasnippets
- clojure-refactoring
- align-cljlet http://www.youtube.com/watch?v=m_5Dldykckg
- define-function http://www.youtube.com/watch?v=D2s_d9gvNVI

Scott


On Thu, Mar 8, 2012 at 9:10 AM, AndyK  wrote:

> Curious about which emacs packages folks use for increased Clojure
> productivity (beyond the obvious, like slime/swank-clojure)...
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Alternate set literal syntax?

2012-03-24 Thread Scott Jaderholm
On Sat, Mar 24, 2012 at 1:44 AM, Cedric Greevey  wrote:
> On Sat, Mar 24, 2012 at 1:28 AM, Sean Corfield  wrote:
>> On Fri, Mar 23, 2012 at 8:44 PM, Cedric Greevey  wrote:
>>> #{foo bar baz} is somewhat ugly. It occurs to me that one could modify
>>> the reader to additionally accept
>>>
>>> {{foo bar baz}}
>>
>> My concern is that {{1 2 3 4}5} is currently legal - a map with a map
>> as a key and 5 as the value. That means that the reader couldn't tell
>> if {{ introduced your set notation or the start of a nested map
>> without looking arbitrarily far ahead. And that problem gets worse if
>> you encounter {{{ or  or... {{{ could introduce a nested map, a
>> map of your sets or one of your sets containing a map...
>
> The other objections are fair enough -- matters of taste. But the
> above is a technical problem with a simple fix: make one pass over the
> source, converting it into a rudimentary AST whose nodes just look

I think the word "reader" above applies both to the human and computer
kinds. You've only addressed the problem for the computer. A user
would still have to look at the end of the collection to know if it is
a set or map (or use editor).

> As for the aesthetics, what I like about {{...}} is that the
> delimiters are symmetrical, unlike #{...}, and it would allow one to
> reserve use of the # mark to, mostly, closures, so # would stand out
> more as typically indicating a lambda.

Sorry to break it to you, but # is used in many places other than
lambdas, so even if you remove it from #{} you still have foo#, #^foo,
#^{foo bar}, #'foo, #"foo", #_foo, #foo{1 2}, #foo[1 2], and others
I've probably forgotten.

One option you have is to use Emacs to replace #{} and #() with
something distinctive looking.

(dolist (mode '(clojure-mode slime-repl-mode))
  (eval-after-load mode `(font-lock-add-keywords
  ',mode
  (mapcar
   (lambda (pair)
 `(,(car pair)
   (0 (progn (compose-region (match-beginning 1)
 (match-end 1)
,(cadr pair))
 nil
   `(("\\(#\\){" "∈")
 ("\\(#\\)(""ƒ")
 ("(\\(fn\\)[\[[:space:]]" "λ")
 ("(\\(comp\\)[\[[:space:]]" "∘")
 ("(\\(range\\)[\[[:space:]]" "ℝ")
 ("(\\(apply \+\\)[\[[:space:]]" "∑")
 ("(\\(Math/pi\\)[\[[:space:]]" "π")
 ("(\\(->\\)[\[[:space:]]" "→")
 ("(\\(partial\\)[\[[:space:]]" "þ")
 ("(\\(complement\\)[\[[:space:]]" "¬")
 ;; not working
 ;; ("Math/pi[:space:]" "π")
 ;; ("(\\(apply \+\\)[\[[:space:]]" "∑")
 )

Cheers,
Scott

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


ClojureScript: defn alert fails in browser repl

2011-09-20 Thread Scott Jaderholm
(defn alert [& xs] (js/alert (apply str xs)))

works in cljsc compiled code but not in the browser repl. There I get

ClojureScript:cljs.user> (defn alert [& xs] (js/alert (apply str xs)))
#
ClojureScript:cljs.user> (alert 1 2 3)
"Error evaluating:" (cljs.core.pr-str (alert 1 2 3)) :as
"cljs.core.pr_str.call(null,cljs.user.alert.call(null,1,2,3));\n"
#
nil

Can anyone reproduce/explain?

Thanks,
Scott

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: How to attach debugger on clojure's repl ?

2011-09-21 Thread Scott Jaderholm
While that still works, ritz is really where it's at for awesome debugging
clojure in emacs. It allows stepping and stuff with a nice UI.

https://github.com/pallet/ritz

Video (only for overview, follow instructions at url above)
http://www.youtube.com/watch?v=d_L51ID36w4

One of my favorite things with it is using it with OpenJDK w/ source so I
can go down the rabbit hole of stepping into my code, Clojure, and the JVM
itself (just for fun, not had a need for this yet).

Scott


On Wed, Sep 21, 2011 at 6:01 PM, Timothy Washington wrote:

> This guy's put together a good video on how to use debugging to swank /
> slime.
>
>- http://www.youtube.com/watch?v=galfpq969Hg
>
>
> Tim Washington
> twash...@gmail.com
> 416.843.9060
>
>
>
> On Tue, Sep 20, 2011 at 10:37 AM, cran1988 wrote:
>
>> I am trying to figure out how abcl does it
>>
>> On Sep 20, 12:41 pm, Herwig Hochleitner 
>> wrote:
>> > You can debug clojure code with a normal Java Debugger.
>> > When using Emacs, you can tryhttp://
>> georgejahad.com/clojure/swank-cdt.html
>> >
>> > --
>> > __
>> > Herwig Hochleitner
>>
>> --
>> 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, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>>
>
>  --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: How to attach debugger on clojure's repl ?

2011-09-23 Thread Scott Jaderholm
I don't think it looks for tools.jar specifically, it probably just uses the
classes in there so as long as they're on the classpath you should be fine.
I wouldn't worry about it unless you see an error saying it can't find some
classes that googling reveals are in tools.jar.

The README doesn't mention any cake plugins, that's why cake ritz isn't
working. If cake supports lein plugins then maybe you didn't do lein plugin
install ritz 0.1.7.

Perhaps use lein or the maven plugin instead.

Scott

On Fri, Sep 23, 2011 at 8:00 AM, Sam Aaron  wrote:

>
> On 23 Sep 2011, at 06:14, Glen Stampoultzis wrote:
> >
> >
> > Ritz looks really nice the setup seems complicated.  I haven't had much
> luck setting it up unfortunately.
>
> Me neither. Here's the steps I took so far:
>
> * Cloned https://github.com/pallet/ritz to a tmp dir
> * Copied the slime dir inside ritz into my .emacs.d dir
> * Modified my global cake project.clj file to look as follows:
>
> (defproject global "0.0.0"
>  :description "Don't rename this project, but you can change the version if
> you want."
>  :dependencies [[clojure "1.3.0-RC0"]]
>  :dev-dependencies [[ritz "0.1.8-SNAPSHOT"]])
>
> * Ran `cake deps --global`
> * My .cake dir now looks as follows:
>
> /Users/sam/.cake
> ├── build
> ├── classes
> ├── lib
> │   ├── clojure-1.3.0-RC0.jar
> │   ├── deps.clj
> │   └── dev
> │   ├── ritz-0.1.8-20110809.143608-3.jar
> │   └── useful-0.4.0.jar
> ├── pom.xml
> ├── project.clj
> ├── run
> └── templates
>└── default
>├── LICENSE
>├── project.clj
>├── src
>│   └── +project+
>│   └── core.clj
>└── test
>
> 10 directories, 9 files
>
> * The ritz README talks about making sure tools.clj is in the classpath.
> However, it appears on OS X there is no tools.jar:
>
> "tools.jar does not exist. Classes usually located here are instead
> included in classes.jar. Scripts that rely on the existence of tools.jar
> need to be rewritten accordingly." (see
> http://developer.apple.com/library/mac/#documentation/Java/Conceptual/Java14Development/02-JavaDevTools/JavaDevTools.html
> )
>
> * I created a blank project with `cake new foo`
> * cd into foo
> * Ran `cake ritz` to get the error "unknown task: ritz".
>
> I'm unsure where to go from here. How do I teach cake about the ritz task?
> Am I missing any specific steps? Is not having tools.jar available on OS X
> an issue?
>
> I'd be very happy to write up a "Getting Started" tutorial on the ritz wiki
> if I can get things working.
>
> Sam
>
> ---
> http://sam.aaron.name
>
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: strangeloop presentations

2011-09-30 Thread Scott Jaderholm
In the past they've been posted on infoq.com several months later.
Scott


On Fri, Sep 30, 2011 at 1:24 PM, Felix Filozov  wrote:

> Do you know if videos will be available?
>
>
> On Friday, September 30, 2011, faenvie  wrote:
> > hi clojure-users,
> >
> > i ploughed through this year's strangeloop presentations
> > today ...
> >
> > 3 presentations that i can recommend for clojure-users:
> >
> > - Jim Duey "EasyMonads" (advanced level)
> >
> >
> https://github.com/strangeloop/2011-slides/blob/master/Duey-MonadsEasy.pdf
> >
> > - David Nolen "The Mapping Dilemma" (advanced level)
> >
> >
> https://github.com/strangeloop/2011-slides/blob/master/Nolen-MappingDilemma.pdf
> >
> > - Stuart Sierra "Introduction to Clojure" (intro level)
> >
> >
> https://github.com/strangeloop/2011-slides/blob/master/Sierra-ClojureIntro.pdf
> >
> > well there may be more for you ... take a look !
> >
> > gruesse
> >
> > --
> > 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, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/clojure?hl=en
> >
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Will clojurescript get in-ns and load?

2011-10-20 Thread Scott Jaderholm
There is a load-file function in clojurescript, I'm guessing that doesn't do
what you want?
Scott


On Thu, Oct 20, 2011 at 1:07 PM, Dave Sann  wrote:

> Thinking further, the capability would not be of use (to me) if it were not
> consistent/indistinguishable across clojure and clojurescript.
>
> I have seen in-ns and load used to effectively split a namespace across
> files
>
> If 'in-ns' and 'load' were implemented for clojurescript, could 'load' be
> managed as a compile time operation to merge the namespaces.
>
> Perhaps there are better ways of achieving this that I am not aware of.
>
> Cheers
>
> D
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: problems of a newbie

2011-11-06 Thread Scott Jaderholm
On Sun, Nov 6, 2011 at 11:33 AM, Milton Silva  wrote:

> On Nov 5, 12:16 pm, Dennis Haupt  wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > hi,
> >
> > i'm half done with my asteroids clone. i stumbled over a few problems
> > and wanted to know how others already solved them :)
> >
> > i am used to "less concrete programming". i ask my tools to do the
> > actual analysis and coding for me:
> > * where is that used?
>
> Your editor does have a search fn right?
>
> A normal search function does not distinguish between matches in comments,
docstrings, strings, variables, and function calls. A where called function
in an IDE does. Slime has slime-who-calls. I don't know how good it is.
There are various other slime-who functions that are just waiting for
volunteers to implement in swank-clojure.


> > * rename that
>
> again, all editors have this.
>

Again, they don't distinguish between the various contexts in which a
matching identifier can appear (e.g. as a substring of a different
identifier, or identical but in a distinct context). There are two renaming
refactorings in clojure-refactoring. How good they are at renaming only the
right things I do not know.

>
> > * show me all errors
>
> what do you mean? for example when I compile a file in emacs I
> (normally) get the line where the error is. or do you mean runtime
> errors?
>

IDEs for Java will show you multiple errors all at once, whereas I think
environments like Slime will stop compiling once they hit an error.


> > * add a parameter here
>
> not sure I understand this one. if you mean (defn [a]..) to (defn [a
> b] ...) how do you do that without manual intervention in any language/
> editor? (just adding more args to something doesn't mean they will be
> properly handled... that is our job)
>
>
IDEs have refactorings for things like this. See Eclipse and IntelliJ. You
give a default value and it changes all calls to use that.

 > * autocomplete this for me, i am too lazy to even remember the exact
> > method name
>
> emacs has this(possible not out of the box) and I suspect other too.
>

ac-slime is pretty limited compared to intellisense systems in static
languages, it doesn't know about context such as what methods can be called
on what objects, other than I think it knows about static methods. Granted
I'm not sure what the limits are in a dynamic language (probably whatever
Smalltalk environments do).


>
> > * show me a list of all methods and fields starting with an "e" that
> > fit in here. i know the one i want is in that list.
>
> emacs also has this(possible not out of the box) and again I suspect
> other too.
>
> Nope, ac-slime doesn't know what identifiers are field names let alone
where they are appropriate. Ditto with methods.

 >
> > as elegant as clojure may be as a language, it's dragging me down to
> > almost native text editing which i did more than 10 years ago when i
> > wrote a game in turbo pascal.
> >
> > how did you solve these problem and get some tool-support? or don't
> > you miss it because of something i am not aware of?
>
> I know IDE support isn't as good as in java but, after looking at your
>

There's lots of reasonable goals for Clojure environments. Being as good as
Java, at least in terms of refactorings, probably isn't one, since in terms
of refactoring there are probably very few languages today that are where
Java was 10 years ago. That said I'm a long time user of
clojure-refactoring and try to encourage people to use it every change I
get.


> code, yes, there is something your not aware of and that is why
> clojure is giving you a hard time.
>
>
In his code I did notice he doesn't use destructing very much.

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: problems of a newbie

2011-11-07 Thread Scott Jaderholm
On Mon, Nov 7, 2011 at 4:27 AM, Dennis Haupt wrote:

> Am 07.11.2011 10:18, schrieb Dennis Haupt:
> >
> >>
> >>
> >> In his code I did notice he doesn't use destructing very much.
> >>
> >
> > where would that have been useful?
>
> defn x [{:keys [foo bar]} param]
>
> instead of
>
> defn x [param]
> (let [foo (:foo param)...])
>
> This

(defn advance-movement [game-element]
  (let [stats (:stats game-element)
position-change (:movement stats)
x-change (:x position-change)
y-change (:y position-change)
with-new-movement
(update-in game-element [:stats :position ] #(translated % x-change
y-change))]
with-new-movement))

can be this

(defn advance-movement [{{{:keys [x y]} :movement} :stats}]
  (update-in game-element [:stats :position ] translated x y))

or if you want the docstring to be short

(defn advance-movement [game-element]
  (let [{{{:keys [x y]} :movement} :stats} game-element]
   (update-in game-element [:stats :position ] translated x y)))

Note how you don't need the extra function #().

I've also noticed that you name your last result in a let and then return
it. I think it's more common to just return it and not name the final
thing.

Also sometimes you create a separate let under a let divided maybe only by
side effects, such as in split-up-asteroid. You could use one let and use _
bindings for side effects.

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: problems of a newbie

2011-11-07 Thread Scott Jaderholm
On Mon, Nov 7, 2011 at 8:33 AM, Dennis Haupt wrote:

> Am 07.11.2011 14:02, schrieb Scott Jaderholm:
> > On Mon, Nov 7, 2011 at 4:27 AM, Dennis Haupt  > <mailto:d.haup...@googlemail.com>> wrote:
> >
> > Am 07.11.2011 10:18, schrieb Dennis Haupt:
> > >
> > >>
> > >>
> > >> In his code I did notice he doesn't use destructing very much.
> > >>
> > >
> > > where would that have been useful?
> >
> > defn x [{:keys [foo bar]} param]
> >
> > instead of
> >
> > defn x [param]
> > (let [foo (:foo param)...])
> >
> > This
> >
> > (defn advance-movement [game-element]
> >   (let [stats (:stats game-element)
> > position-change (:movement stats)
> > x-change (:x position-change)
> > y-change (:y position-change)
> > with-new-movement
> > (update-in game-element [:stats :position ] #(translated %
> > x-change y-change))]
> > with-new-movement))
> >
> > can be this
> >
> > (defn advance-movement [{{{:keys [x y]} :movement} :stats}]
>
>
>
> >   (update-in game-element [:stats :position ] translated x y))
> >
> > or if you want the docstring to be short
> >
> > (defn advance-movement [game-element]
> >   (let [{{{:keys [x y]} :movement} :stats} game-element]
> >(update-in game-element [:stats :position ] translated x y)))
> >
> > Note how you don't need the extra function #().
> >
> > I've also noticed that you name your last result in a let and then
> > return it. I think it's more common to just return it and not name the
> > final thing.
>
> that's because there once was some code which i deleted. i was too lazy
> to remove the part in the let :)
>
> >
> > Also sometimes you create a separate let under a let divided maybe only
> > by side effects, such as in split-up-asteroid. You could use one let and
> > use _ bindings for side effects.
>
> let [_ (println "like this?")]
>
>
(let [a (b)
  c (d)
  _ (e)
  _ (f)
  g (h)
  ...] ...)

instead of

(let [a (b)
  c (d)]
  (e)
  (f)
  (let [g (h)
...]) ...)

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: on lisp and scheme macros

2011-12-03 Thread Scott Jaderholm
Scheme style macros in Clojure: https://github.com/qbg/syntax-rules

Scott


On Sat, Dec 3, 2011 at 1:20 PM, Razvan Rotaru wrote:

> Hi everyone,
>
> I was searching the web these days trying to find out more about these
> two macro systems and understand their differences, and why one is
> preferable over the other (or not). I'd like to share with you some
> ideas, and hopefully get some opinions back as well. Coming from the
> lisp side, and without much knowledge on scheme macros, I'm also
> trying to decide for myself whether scheme macros can have a
> (practical) advantage.
>
> One good point (found here http://lambdagrok.wikidot.com/forum/t-194636)
> I think explains it pretty well: lisp macros merely transform a list
> into another, while scheme macros use a pattern matching "sub-
> language" to "apply transformations" on the input syntax, and produce
> new syntax. I think this puts the finger on the spot.
>
> It seems to me that with macros, scheme breaks out of the
> homoiconicity of lisp, and opens up a new array of possibilities:
> define new languages with different syntax (while lisp allows
> new languages but with the same syntax). I'm saying this by looking at
> Racket and the direction it has chosen to go (have a look at Typed
> Scheme and Datalog). This looks like the world turned upside down: the
> pattern matching macro system is the essence of the system, and scheme
> is just another language defined with it. The list is not that
> important anymore, since it's not so essential for the macro system.
>
> Now, I have read some opinions which say that most who choose the
> scheme macros, make it for the pattern matching abilities and not for
> the hygienic part. This seems like a reasonable thing to do, since I
> don't hear lispers complain about unhygienicity. If there are people
> out there who had some practical experience with scheme macros, I hope
> they read this post and share some thoughts.
>
> I have a feeling that there's an additional gain with scheme macros:
> debugging information given by the system when something goes wrong.
> But it's only a feeling, I know too little of this subject to be sure.
> Macros are hard to debug. The stacktrace displayed by clojure does not
> contain information related to macro code. It's probably hard to do.
> My feeling relates to the fact that in scheme macro processing is not
> arbitrary, but rather strictly defined and under control. So I'm
> thinking that this gives scheme more control over what's going on in a
> macro and also enables scheme to give me more information in a
> stacktrace. I'd love to hear other opinions on this.
>
> Another point I find peculiar is the small attention that scheme
> macros got during all these years. I wonder why it's like that. It
> could be scheme's low score for practical stuff, but then again I
> don't know of another language that borrows these kind of macros. Does
> anybody know?
>
> And lastly, a question to Rich Hickey, should he read this post: what
> is the reasoning behind the choice of lisp macros over scheme's?
>
> Cheers,
> Razvan
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure list syntax sugar: f(x) notation

2011-12-27 Thread Scott Jaderholm
Do you support this?

classic: ((foo bar) baz)
your syntax: foo(bar)(baz)

Scott


On Mon, Dec 26, 2011 at 1:09 PM, Louis Yu Lu  wrote:

> Recently, I found freedom of coding playing with Clojure with over 20
> years’ experience on other program languages, Previously, I had
> several trials of learning Lisp, but never got traction.
>
> However there are two syntax notations always bother me, it feels
> unnatural with my experience on other programming languages and math:
>
> 1)  Prefix operator for math formula. Jeffrey Bester’s math library
> https://github.com/jbester/cljext/blob/master/cljext/math.clj has
> brought in the infix notation and solved the problem;
> 2)  The leading item of a list follows the parenthesis when it serves
> as a function name, (f x) instead of f(x). I am fully aware of many
> discussions on alternative syntax for Clojure and Lisp in the past,
> one stream is here
> http://groups.google.com/group/clojure/browse_thread/thread/319a1c77ed718ba/3e4be7484b7cbe38
> My proposition is enhance Clojure to accept both (f x) and f(x), the
> leading item can appear either after ‘(‘ as usual with classic Lisp
> notion:
> (println "Hello," "world!")
> or with conventional function call notation:
>println("Hello," "world!")
> The f(x) notation is just a syntax sugar, the only restriction is no
> space between the leading item and '('.  If one or more spaces in
> between, the item will be treated as a separate symbol. Either notion
> or a mix of them can be used in the same program. Here are some
> examples:
>
> ; classic Lisp syntax notation
> (defn pig-latin [word]
>  (let [first-letter (first word)]
>(if (.contains "aeiou" (str first-letter))
>  (str word "ay")
>  (str (subs word 1) first-letter "ay"
> (println (pig-latin "red"))
> (println (pig-latin "orange"))
>
> ; f(x) syntax notation
> defn(pig-latin [word]
>  let( [first-letter first(word)]
>if(.contains("aeiou", str(first-letter))
>  str(word, "ay")
>  str(subs(word, 1), first-letter, "ay"
> println(pig-latin("red"))
> println(pig-latin("orange"))
>
> ; classic Lisp syntax notation
> (defn fib [n]
>   (if  (< n 2)
>   1
>  (+  (fib (dec n) )  (fib (- n 2)
> (fib 36)
>
> ; mix of two notations
> defn(fib [n]
>   if((< n 2)
>   1
>   (+ fib(dec(n))  fib((- n 2)))
>   )
> )
> fib(36)
>
> I have made minor changes (dozen lines) in one file (LispReader.java)
> from Clojure source repository to implement this syntax sugar(code
> posted at https://github.com/louisyulu/clojure-fx). It works with well-
> formed classic Clojure code and the proposed notation.
> Running the test suite from Clojure distribution results two error:
> One in the file compilation.clj line 90:
> (recur y ^Long(rem x y)]
> The problem is ^Long(… becomes function call, the fix is adding a
> space in between
> (recur y ^Long  (rem x y)]
>
> The second is in the file sequences.clj line 1131:
>(is (=(partition-by #{\a \e \i \o \u} "abcdefghijklm")
> The problem is (=(… , ‘=’ is associated with following ‘(‘, the
> intention was the previous ‘(‘, the fix is also adding a space in
> between
>(is (=  (partition-by #{\a \e \i \o \u} "abcdefghijklm")
>
> These two cases are caused by the not well-formed Clojure code
> (strictly speaking, each item in the list should be separated by a
> space).
>
> The proposed syntax sugar apparently pleases my eyes and fingers from
> conventional languages. With some experiments, I found the code is
> more readable for me to use f(x) notation for function call, and (op
> x) for operator.
>
> I like to hear from the community what kind of dark corner the
> proposed syntax sugar may run into.
>
> Thanks,
> Louis
>
>
>
>
>
>
>
>
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: [ANN] analyze 0.1

2012-01-02 Thread Scott Jaderholm
Very cool. If you think of other potential example errors this would be
capable of detecting it might be nice to include them in a TODO list in the
README. This might motivate someone to implement them or develop a nice
emacs UI for displaying these errors.

Scott


On Mon, Jan 2, 2012 at 4:14 AM, Ambrose Bonnaire-Sergeant <
abonnaireserge...@gmail.com> wrote:

> Inspired by the ClojureScript compiler, analyze is an interface to the
> Clojure analysis phase.
>
> Check the README for some cool things you can do.
>
> https://clojars.org/analyze
> https://github.com/frenchy64/analyze
>
> I've barely tested the library but it manages to analyze a good part of
> the core Clojure library.
> This is work in progress.
>
> If you heard Rich Hickey talking about leveraging the "analysis phase" at
> the Conj, this is a step in that direction.
>
> Have fun :)
> Ambrose
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: ANN: Emacs auto-complete plugin for slime users

2010-10-15 Thread Scott Jaderholm
Works for me in repl. I have too much slime/clojure customization code, not
really sure what does what :)

Maybe this:

(defun slime-clojure-repl-setup ()
  (when (string-equal "clojure" (slime-connection-name))
(message "Setting up repl for clojure")
(when (slime-inferior-process)
  (slime-redirect-inferior-output))

(set-syntax-table clojure-mode-syntax-table)
(clojure-mode-font-lock-setup)

(setq lisp-indent-function 'clojure-indent-function)

(when (and (featurep 'paredit) paredit-mode (>= paredit-version 21))
  (define-key slime-repl-mode-map "{" 'paredit-open-curly)
  (define-key slime-repl-mode-map "}" 'paredit-close-curly))
(slime-setup '(slime-fancy

(add-hook 'slime-repl-mode-hook 'slime-clojure-repl-setup)

Scott


On Sat, Oct 16, 2010 at 12:27 AM, Jarl Haggerty wrote:

> Should autocomplete work in the swank repl?  It works perfectly in a
> clj buffer but nothing happens in the repl.
>
> On Aug 19, 7:46 am, Phil Hagelberg  wrote:
> > On Thu, Aug 19, 2010 at 6:21 AM, Steve Purcell 
> wrote:
> > > I guess Phil's very busy, but if he can apply this patch, then the
> regular swank-clojure 1.3.0-SNAPSHOT on clojars should end up containing the
> fix.
> >
> > Just applied this patch and pushed to github and clojars. Thanks!
> >
> > -Phil
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure on Javascript

2010-10-30 Thread Scott Jaderholm
On Sat, Oct 30, 2010 at 12:09 AM, David Nolen wrote:

> More interesting would be something along the lines of CoffeeScript (like
> ClojureScript) that takes a reasonable subset Clojure and compiles into
> efficient JS, allowing Clojure programmers to send Clojure code to clients.
>

That already exists in Allen Rohner's Scriptjure.
http://github.com/arohner/scriptjure

Scriptjure is very much equivalent to CoffeeScript, though not
Underscore.coffee. Most of my patches to scriptjure originated when I was
porting a CoffeeScript codebase to Scriptjure. The only major features of
CoffeeScript that it doesn't have that I notice are implicit returns and
well indented js output.

Of course Scriptjure is not Clojure on JS. It's just JS with Clojure syntax
and a few nice "compiler" tricks.

Being able to jump out to real Clojure inside your Clojure-looking JS with a
simple (clj (some real clojure code)) comes in really handy when the backend
is also Clojure and you have some data that both the client and server need.

You can also configure Emacs+mozrepl so that if you eval some scriptjure
code in emacs it gets compiled to js and evaled in your web browser.

Cheers,
Scott

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure Box Windows XP

2010-11-05 Thread Scott Jaderholm
This sounds like a problem with emacs server/client that might be unrelated
to Clojure or Slime. Some configurations of emacs will start a server mode
so that you can run emacsclient and have a new frame pop up instantaneously.
If you don't need emacsclient then you might look in the clojure box configs
for a line (server-start) and remove that.

On Fri, Nov 5, 2010 at 4:50 PM, Jferg  wrote:

> I have installed twice, restarted my machine to make sure all is
> well.   However, the Emacs Client window shows: "Waiting for Emacs
> server to start" and yet the SLIME REPL buffer appears to be
> functional and various messages like: "Connected Your hacking starts
> now!" show up in the status.  Eventually the Emacs Client window
> shows: "ERROR Timeout waiting for server".
>
> What can I look at to debug this?  I tried guessing at ports and
> processes using netstat -ao | grep'ing for process ids... nothing real
> popped up.
>  I am using Clojure box 1.2.0 on Windows XP Service Pack 3.
>
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

ANN: slice (a web library for writing and composing snippets of html, css, and js that are written in Clojure)

2010-11-08 Thread Scott Jaderholm
Slice is an experimental not-production-ready web library for writing and
composing snippets of html, css, and js that are written in Clojure.

The motivation is that I wanted the html, css, and js for a slice of a
webpage to be next to each other in the source, not in three separate files,
and that I wanted these slices to be functions that could be composed. The
hope is that this will lead to higher-level widgetish code.

See https://github.com/scottjad/slice for an overview and
https://github.com/scottjad/slice/blob/master/src/slice/example.clj for an
example.

And yes, I realize designers would hate this. Target is solo developers.

Feedback welcome.

Some of you may have seen an old version (https://gist.github.com/518689)
several months ago that used it's own scoping rules and lots of macros. This
is a complete rewrite.

Cheers,
Scott

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: macro debugger

2010-11-09 Thread Scott Jaderholm
It's not specialized like your link, but I think you can use normal
debugging tools on macros:

(defmacro foo [a]
  (swank.core/break)
  `(list ~a))

And CDT for stepping.

Scott


On Tue, Nov 9, 2010 at 8:50 AM, Sunil S Nandihalli <
sunil.nandiha...@gmail.com> wrote:

> Hello everybody,
>  Today I just googled for macro-debugger and found the following ...
> http://docs.racket-lang.org/macro-debugger/index.html
>
> I have not completely explored it yet .. however, I was wondering if there
> is something similar for clojure.. is it possible to develop one?
>
> Thanks,
> Sunil.
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

ANN: Programothesis screencast series on Clojure, Emacs, etc

2010-11-12 Thread Scott Jaderholm
Hey Clojurians,

I don't think there are any great new movies in the theater this weekend so
if you're looking to kick back and relax and watch the tube a bit you might
checkout the first few episodes of my new screencast series on Clojure,
Emacs, Slime, etc.

http://youtube.com/emailataskcom

The episodes were recorded several months ago but just posted today. I
expect to post a ton more real soon so subscribe if you want to be notified.

Also I just launched a webapp written entirely in Clojure (and slice
http://github.com/scottjad/slice). It's http://emailatask.com and is for
sending tasks (and reminders) to people through email without an account and
for free.

Cheers,
Scott

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Emacs `align' function customization for Clojure

2011-01-05 Thread Scott Jaderholm
On Tue, Jan 4, 2011 at 9:10 PM, Eric Schulte  wrote:
> I wonder if anyone else has written any similar Emacs alignment rules
> for Clojure which they would be interested in sharing?

Alignment rules for let and defroutes are at the top of my most wanted list.

(let [n(count content-divs)
  width500
  widthpx  (str width "px")
  scrollable-id(or scrollable-id (str "scrollable" (rand-int 100)))
  scrollable-fname (symbol scrollable-id)]


(defroutes app
  (GET "/"  _   (main-page))
  (GET "/subscribe" _   (slices site-header subscribe-button))
  (GET "/test"  request (slices jquery
  (dom (alert ~(:remote-addr request)))
  (html [:h1 "Hi"])
  (css [:h1 :color "blue"]

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: [ANN] emacs-nexus (Emacs client for Nexus Maven repository servers)

2011-02-14 Thread Scott Jaderholm
On Mon, Feb 14, 2011 at 7:21 PM, Jürgen Hötzel  wrote:

> Hi,
>
> Although Emacs is a great environment for writing Clojure code and
> Leiningen/Cake makes Maven builds less painful, you still had to
> switch from your Emacs environment to your web browser to search for
> Maven artifacts.
>
> emacs-nexus is a minimal (elisp-only) Nexus client to search for
> artifacts and display Leiningen/Maven dependencies:
>
> https://github.com/juergenhoetzel/emacs-nexus
>
> Any feedback/contribution  is appreciated.
>
>
Cool, maybe search clojars by default also?

Scott

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: ANN: Clojure Toolbox (Early Beta)

2011-02-24 Thread Scott Jaderholm
On Wed, Feb 23, 2011 at 6:17 PM, James Reeves wrote:

> I'm sure I've covered only a very small proportion of Clojure
> libraries out there, so if you'd like to suggest a project that's not
> on there, please do so in this thread, or in an email to me. I'll try
> and update the site as quickly as possible.
>

Some that I like:
slice
scriptjure
clojurejs
cssgen
gaka

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Monad Lessons

2011-03-09 Thread Scott Jaderholm
I'd be interested. This doesn't really scale though in the way a recording
does. Are you thinking this would give you a chance to practice teaching it
before making a recording?

Maybe post the slides so people can get an idea of what will be covered.

Also, maybe clarify whether this is free (http://xkcd.com/870/).

Scott


On Wed, Mar 9, 2011 at 2:15 PM, jim  wrote:

> I gave a talk at CodePaLOUsa on monads and got some favorable
> feedback. So I thought I'd offer to do a live training session on
> monads using pretty much the same material, but at a shared REPL
> rather than with slides.
>
> How it would work is I would start a Skype conference for 5 to 10
> people. We would also all log in to a tmux session where I would show
> the examples and their results.
>
> So, my question is how many would be interested in such a session?
> This would be a basic introduction to monads. Future session could be
> about more advanced monad topics, if there was a demand for that.
>
> Jim
>
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en