Performance Patterns

2013-07-14 Thread Marc Dzaebel
I'm often in need of performance comparisons/recommendations about 
different ways to code the same usecases. E.g.

(time(let [x 2 y [0 1 2 3 4]] (dotimes [_ 1000] (remove *#{x}*y 
;~950 ms
(time(let [x 2 y [0 1 2 3 4]] (dotimes [_ 1000] (remove *#(= % x)*y 
;~150 ms

(time(let [a (int-array 10)]  (dotimes [_ 1000] (*aset *a 1 
2;~7 ms
(time(let [a (int-array 10)]  (dotimes [_ 1000] (*aset-int *a 1 
2;~430 ms

I'd recommend to gather such information at a central place in a more 
systematic way. So I wonder:

   - where to place such information 
(Wiki?)
   - whether this information is of use 
   - whether you have more recommendations regarding performance or the 
   form, advices are presented
   
*Thanks, Marc*

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [ANN] CHP Web Framework Documentation Update

2013-07-14 Thread Paulo Suzart
I definitely liked it.

Until now clojure has nothing compared to Grails, Revel (golang) or
playframework. CHP can be a good starting point.

I don't advocate for things like such frameworks, but sometimes you just
want something like them for a quick/prototyping project.

Although extensively documented, the reasoning behind some parts are not so
clear, specially into resources dir (modules, package, api, etc). So a
general section showing the conventionalized project structure, and the
flow of a request would clear a lot.


Great job. Hope I can find time to contribute.

Cheers


On 11 July 2013 11:13, Steven Degutis  wrote:

> I am.
>
>
> On Wed, Jul 10, 2013 at 2:59 PM, Kelker Ryan wrote:
>
>> Thanks. It's currently alpha and there's a lot more to come.
>>
>> Are you by chance the same Degutis from 8th light?
>>
>> 11.07.2013, 02:12, "Steven Degutis" :
>>
>> Wow. You obviously put a lot of work into this. And it looks extremely
>> well documented!
>>
>>
>> On Wed, Jul 10, 2013 at 5:36 AM, Kelker Ryan wrote:
>>
>> ClojureHomePage is a Clojure Web Framework
>>
>>
>>
>> *CHTML, Routing, and Sessions *
>>
>>- CHTML & Routes
>>- Session handling, Cookies, and 
>> Compojure
>>
>> * Ring *
>>
>>- Ring and port 
>> configuration
>>- Auto-loading 
>> middleware
>>
>> * Code Generation & Modules *
>>
>>- Generating views from a 
>> table
>>- View bindings 
>>- View bindings 
>> Example
>>- Enable admin 
>> account
>>- Database and Bindings 
>> tutorial
>>- HTML 
>> Generation
>>- CSS 
>> Generation
>>- JavaScript 
>> Generation
>>- CHP Modules 
>>- Module Packages 
>>
>> * SQL Configuration, Migrations, and Manipulation *
>>
>>- SQL DB configuration and 
>> creation
>>- SQL DB Migrations 
>>- SQL Manipulation
>>- Get column syntax 
>> example
>>
>> * General Information *
>>
>>- Install 
>>- UML Relationships 
>>- Unit Tests
>>- Removing example 
>> files
>>- License 
>>- How? 
>>- Tutorial 
>>
>>
>> --
>> --
>> 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>>
>> --
>> --
>> 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>>  --
>> --
>> You received this message be

Re: lazy-seq with meta

2013-07-14 Thread Tassilo Horn
Karsten Schmidt  writes:

> Sinc the prefix map is built iteratively as part of the parsing I was
> hoping to attach it as meta data to the returned lazy-seq, since I
> can't see any other way of returning this map apart from attaching to
> every single triple in the seq (which seems like overkill).

Well, a (lazy) seq has a value and a rest which is again a (lazy) seq.
In your original code, you also added metadata to every seq the complete
seq was built from, so it has been the very same overkill in principle.

> Are there any other options I'm missing here?

As you've said, you could add the prefix map to the triples.

Or you could make you functions return tuples of the form [triple-seq
prefix-map].  However, to build the complete prefix-map, you'd possibly
need to parse everything, so the benefit of a lazy triple-seq is gone.

So I think I'd just go with the approach of adding the prefix map to the
triples.  Since that's the very same map most of the time anyway, it's
only adding one pointer per triple which is not so bad as it seems.

Bye,
Tassilo

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [ANN] CHP Web Framework Documentation Update

2013-07-14 Thread Kelker Ryan
Thanks. It's very very Alpha at the moment and the framework will definitely be trimmed and polished before Beta1. Right now the api is for quick read-only JSON results of the database defined by models in /resources/api/. The packages and modules are to facilitate some generic website structures that will be bundled with the CHP framework in the Beta stages. I feel that a generic website skeleton structure should be generated with one single command and this is where the packages and modules come in. Feel free to personally e-mail me for suggestions and constructive criticism. 14.07.2013, 17:29, "Paulo Suzart" :I definitely liked it. Until now clojure has nothing compared to Grails, Revel (golang) or playframework. CHP can be a good starting point. I don't advocate for things like such frameworks, but sometimes you just want something like them for a quick/prototyping project. Although extensively documented, the reasoning behind some parts are not so clear, specially into resources dir (modules, package, api, etc). So a general section showing the conventionalized project structure, and the flow of a request would clear a lot.  Great job. Hope I can find time to contribute. CheersOn 11 July 2013 11:13, Steven Degutis  wrote:I am.On Wed, Jul 10, 2013 at 2:59 PM, Kelker Ryan  wrote:Thanks. It's currently alpha and there's a lot more to come. Are you by chance the same Degutis from 8th light? 11.07.2013, 02:12, "Steven Degutis" :Wow. You obviously put a lot of work into this. And it looks extremely well documented!On Wed, Jul 10, 2013 at 5:36 AM, Kelker Ryan  wrote:ClojureHomePage is a Clojure Web Framework CHTML, Routing, and Sessions CHTML & RoutesSession handling, Cookies, and Compojure Ring Ring and port configurationAuto-loading middleware Code Generation & Modules Generating views from a tableView bindingsView bindings ExampleEnable admin accountDatabase and Bindings tutorialHTML GenerationCSS Generation_javascript_ GenerationCHP ModulesModule Packages SQL Configuration, Migrations, and Manipulation SQL DB configuration and creationSQL DB MigrationsSQL ManipulationGet column syntax example General Information InstallUML RelationshipsUnit TestsRemoving example filesLicenseHow?Tutorial --  --  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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.     --  --  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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.     --  --  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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.     --  --  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 unsubscribe from this group and stop receiving emails fro

direction of an arrow in core.async

2013-07-14 Thread Alice
Wouldn't ! for a take more natural than the current one?
When I read code like (- 1 2), I tranform it into (1 - 2) in my head, 
likewise when I see (>! c "hi"), I read it as (c >! "hi"), which doesn't 
look right.

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: direction of an arrow in core.async

2013-07-14 Thread James Reeves
On 14 July 2013 15:21, Alice  wrote:

> Wouldn't ! for a take more natural than the current one?
> When I read code like (- 1 2), I tranform it into (1 - 2) in my head,
> likewise when I see (>! c "hi"), I read it as (c >! "hi"), which doesn't
> look right.
>

I find the current syntax more natural. I see "!" as the pipe and ">" and
"<" as the direction of data flow. So ">!" is pushing data into the pipe,
and "http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [ANN]: Introducing lein-try

2013-07-14 Thread Ryan Neufeld
Can you pop that in an issue on the project. In the mean time I'll see if I
reproduce that problem.
On Jul 13, 2013 11:30 PM, "Sean Corfield"  wrote:

> It doesn't work when I spell it correctly either (and I had done
> several tests - but of course the results of misspelling it look the
> same as it not working - and it's indicative of my day that I pasted
> the result of a bad test! :)
>
> C:\Users\Sean\clojure>lein new five
> ...
> C:\Users\Sean\clojure>cd five
> C:\Users\Sean\clojure\five>lein try hiccup 1.0.2
> Retrieving lein-try/lein-try/0.1.1/lein-try-0.1.1.pom from clojars
> Retrieving lein-try/lein-try/0.1.1/lein-try-0.1.1.jar from clojars
> Retrieving org/clojure/clojure/1.2.1/clojure-1.2.1.jar from central
> nREPL server started on port 51113
> REPL-y 0.2.0
> Clojure 1.5.1
> Docs: (doc function-name-here)
>   (find-doc "part-of-name-here")
>   Source: (source function-name-here)
>  Javadoc: (javadoc java-object-or-class-here)
> Exit: Control+D or (exit) or (quit)
> user=> (use 'hiccup.core)
> FileNotFoundException Could not locate hiccup/core__init.class or
> hiccup/core.clj on classpath:   clojure.lang.RT.load (RT.java:443)
> user=> ^D
> Bye for now!
>
> C:\Users\Sean\clojure\five>cd ..
> C:\Users\Sean\clojure>lein try hiccup 1.0.2
> nREPL server started on port 51183
> REPL-y 0.2.0
> Clojure 1.5.1
> Docs: (doc function-name-here)
>   (find-doc "part-of-name-here")
>   Source: (source function-name-here)
>  Javadoc: (javadoc java-object-or-class-here)
> Exit: Control+D or (exit) or (quit)
> user=> (use 'hiccup.core)
> nil
> user=> ^D
> Bye for now!
> C:\Users\Sean\clojure>
>
> (and that's just to show it failing the same way on Windows 8 (with
> GNU on Windows) as it does on Mac!)
>
> Sean
>
> On Sat, Jul 13, 2013 at 9:26 PM, Ryan Neufeld 
> wrote:
> > It looks like you tried to use hiccup.ocre instead of core
> >
> > --
> > --
> > 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 unsubscribe from this group and stop receiving emails from it, send
> an email to clojure+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
>
>
> --
> Sean A Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
> World Singles, LLC. -- http://worldsingles.com/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)
>
> --
> --
> 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 a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/YZDYufCtKRA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [ANN]: Introducing lein-try

2013-07-14 Thread Softaddicts
After reading this thread, I think we need another plug in to try the try plugin
which in turn may fail which would trigger the need for another try plugin 
which 

Isn't this recursive a bit ? :

Luc


> Can you pop that in an issue on the project. In the mean time I'll see if I
> reproduce that problem.
> On Jul 13, 2013 11:30 PM, "Sean Corfield"  wrote:
> 
> > It doesn't work when I spell it correctly either (and I had done
> > several tests - but of course the results of misspelling it look the
> > same as it not working - and it's indicative of my day that I pasted
> > the result of a bad test! :)
> >
> > C:\Users\Sean\clojure>lein new five
> > ...
> > C:\Users\Sean\clojure>cd five
> > C:\Users\Sean\clojure\five>lein try hiccup 1.0.2
> > Retrieving lein-try/lein-try/0.1.1/lein-try-0.1.1.pom from clojars
> > Retrieving lein-try/lein-try/0.1.1/lein-try-0.1.1.jar from clojars
> > Retrieving org/clojure/clojure/1.2.1/clojure-1.2.1.jar from central
> > nREPL server started on port 51113
> > REPL-y 0.2.0
> > Clojure 1.5.1
> > Docs: (doc function-name-here)
> >   (find-doc "part-of-name-here")
> >   Source: (source function-name-here)
> >  Javadoc: (javadoc java-object-or-class-here)
> > Exit: Control+D or (exit) or (quit)
> > user=> (use 'hiccup.core)
> > FileNotFoundException Could not locate hiccup/core__init.class or
> > hiccup/core.clj on classpath:   clojure.lang.RT.load (RT.java:443)
> > user=> ^D
> > Bye for now!
> >
> > C:\Users\Sean\clojure\five>cd ..
> > C:\Users\Sean\clojure>lein try hiccup 1.0.2
> > nREPL server started on port 51183
> > REPL-y 0.2.0
> > Clojure 1.5.1
> > Docs: (doc function-name-here)
> >   (find-doc "part-of-name-here")
> >   Source: (source function-name-here)
> >  Javadoc: (javadoc java-object-or-class-here)
> > Exit: Control+D or (exit) or (quit)
> > user=> (use 'hiccup.core)
> > nil
> > user=> ^D
> > Bye for now!
> > C:\Users\Sean\clojure>
> >
> > (and that's just to show it failing the same way on Windows 8 (with
> > GNU on Windows) as it does on Mac!)
> >
> > Sean
> >
> > On Sat, Jul 13, 2013 at 9:26 PM, Ryan Neufeld 
> > wrote:
> > > It looks like you tried to use hiccup.ocre instead of core
> > >
> > > --
> > > --
> > > 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 unsubscribe from this group and stop receiving emails from it, send
> > an email to clojure+unsubscr...@googlegroups.com.
> > > For more options, visit https://groups.google.com/groups/opt_out.
> > >
> > >
> >
> >
> >
> > --
> > Sean A Corfield -- (904) 302-SEAN
> > An Architect's View -- http://corfield.org/
> > World Singles, LLC. -- http://worldsingles.com/
> >
> > "Perfection is the enemy of the good."
> > -- Gustave Flaubert, French realist novelist (1821-1880)
> >
> > --
> > --
> > 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 a topic in the
> > Google Groups "Clojure" group.
> > To unsubscribe from this topic, visit
> > https://groups.google.com/d/topic/clojure/YZDYufCtKRA/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to
> > clojure+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
> >
> 
> -- 
> -- 
> 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 unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 
--
Softaddicts sent by ibisMail from my ipad!

-- 
-- 
You received this message 

Re: [ANN]: Introducing lein-try

2013-07-14 Thread Ryan Neufeld
I figured there was a joke somewhere in there, but I just couldn't tease a
good one out ;)
On Jul 14, 2013 9:54 AM, "Softaddicts"  wrote:

> After reading this thread, I think we need another plug in to try the try
> plugin
> which in turn may fail which would trigger the need for another try plugin
> which 
>
> Isn't this recursive a bit ? :
>
> Luc
>
>
> > Can you pop that in an issue on the project. In the mean time I'll see
> if I
> > reproduce that problem.
> > On Jul 13, 2013 11:30 PM, "Sean Corfield" 
> wrote:
> >
> > > It doesn't work when I spell it correctly either (and I had done
> > > several tests - but of course the results of misspelling it look the
> > > same as it not working - and it's indicative of my day that I pasted
> > > the result of a bad test! :)
> > >
> > > C:\Users\Sean\clojure>lein new five
> > > ...
> > > C:\Users\Sean\clojure>cd five
> > > C:\Users\Sean\clojure\five>lein try hiccup 1.0.2
> > > Retrieving lein-try/lein-try/0.1.1/lein-try-0.1.1.pom from clojars
> > > Retrieving lein-try/lein-try/0.1.1/lein-try-0.1.1.jar from clojars
> > > Retrieving org/clojure/clojure/1.2.1/clojure-1.2.1.jar from central
> > > nREPL server started on port 51113
> > > REPL-y 0.2.0
> > > Clojure 1.5.1
> > > Docs: (doc function-name-here)
> > >   (find-doc "part-of-name-here")
> > >   Source: (source function-name-here)
> > >  Javadoc: (javadoc java-object-or-class-here)
> > > Exit: Control+D or (exit) or (quit)
> > > user=> (use 'hiccup.core)
> > > FileNotFoundException Could not locate hiccup/core__init.class or
> > > hiccup/core.clj on classpath:   clojure.lang.RT.load (RT.java:443)
> > > user=> ^D
> > > Bye for now!
> > >
> > > C:\Users\Sean\clojure\five>cd ..
> > > C:\Users\Sean\clojure>lein try hiccup 1.0.2
> > > nREPL server started on port 51183
> > > REPL-y 0.2.0
> > > Clojure 1.5.1
> > > Docs: (doc function-name-here)
> > >   (find-doc "part-of-name-here")
> > >   Source: (source function-name-here)
> > >  Javadoc: (javadoc java-object-or-class-here)
> > > Exit: Control+D or (exit) or (quit)
> > > user=> (use 'hiccup.core)
> > > nil
> > > user=> ^D
> > > Bye for now!
> > > C:\Users\Sean\clojure>
> > >
> > > (and that's just to show it failing the same way on Windows 8 (with
> > > GNU on Windows) as it does on Mac!)
> > >
> > > Sean
> > >
> > > On Sat, Jul 13, 2013 at 9:26 PM, Ryan Neufeld  >
> > > wrote:
> > > > It looks like you tried to use hiccup.ocre instead of core
> > > >
> > > > --
> > > > --
> > > > 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 unsubscribe from this group and stop receiving emails from it,
> send
> > > an email to clojure+unsubscr...@googlegroups.com.
> > > > For more options, visit https://groups.google.com/groups/opt_out.
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Sean A Corfield -- (904) 302-SEAN
> > > An Architect's View -- http://corfield.org/
> > > World Singles, LLC. -- http://worldsingles.com/
> > >
> > > "Perfection is the enemy of the good."
> > > -- Gustave Flaubert, French realist novelist (1821-1880)
> > >
> > > --
> > > --
> > > 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 a topic in the
> > > Google Groups "Clojure" group.
> > > To unsubscribe from this topic, visit
> > > https://groups.google.com/d/topic/clojure/YZDYufCtKRA/unsubscribe.
> > > To unsubscribe from this group and all its topics, send an email to
> > > clojure+unsubscr...@googlegroups.com.
> > > For more options, visit https://groups.google.com/groups/opt_out.
> > >
> > >
> > >
> >
> > --
> > --
> > 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/clojur

Re: [ANN]: Introducing lein-try

2013-07-14 Thread Softaddicts
Nice ... try :)

Luc


> I figured there was a joke somewhere in there, but I just couldn't tease a
> good one out ;)
> On Jul 14, 2013 9:54 AM, "Softaddicts"  wrote:
> 
> > After reading this thread, I think we need another plug in to try the try
> > plugin
> > which in turn may fail which would trigger the need for another try plugin
> > which 
> >
> > Isn't this recursive a bit ? :
> >
> > Luc
> >
> >
> > > Can you pop that in an issue on the project. In the mean time I'll see
> > if I
> > > reproduce that problem.
> > > On Jul 13, 2013 11:30 PM, "Sean Corfield" 
> > wrote:
> > >
> > > > It doesn't work when I spell it correctly either (and I had done
> > > > several tests - but of course the results of misspelling it look the
> > > > same as it not working - and it's indicative of my day that I pasted
> > > > the result of a bad test! :)
> > > >
> > > > C:\Users\Sean\clojure>lein new five
> > > > ...
> > > > C:\Users\Sean\clojure>cd five
> > > > C:\Users\Sean\clojure\five>lein try hiccup 1.0.2
> > > > Retrieving lein-try/lein-try/0.1.1/lein-try-0.1.1.pom from clojars
> > > > Retrieving lein-try/lein-try/0.1.1/lein-try-0.1.1.jar from clojars
> > > > Retrieving org/clojure/clojure/1.2.1/clojure-1.2.1.jar from central
> > > > nREPL server started on port 51113
> > > > REPL-y 0.2.0
> > > > Clojure 1.5.1
> > > > Docs: (doc function-name-here)
> > > >   (find-doc "part-of-name-here")
> > > >   Source: (source function-name-here)
> > > >  Javadoc: (javadoc java-object-or-class-here)
> > > > Exit: Control+D or (exit) or (quit)
> > > > user=> (use 'hiccup.core)
> > > > FileNotFoundException Could not locate hiccup/core__init.class or
> > > > hiccup/core.clj on classpath:   clojure.lang.RT.load (RT.java:443)
> > > > user=> ^D
> > > > Bye for now!
> > > >
> > > > C:\Users\Sean\clojure\five>cd ..
> > > > C:\Users\Sean\clojure>lein try hiccup 1.0.2
> > > > nREPL server started on port 51183
> > > > REPL-y 0.2.0
> > > > Clojure 1.5.1
> > > > Docs: (doc function-name-here)
> > > >   (find-doc "part-of-name-here")
> > > >   Source: (source function-name-here)
> > > >  Javadoc: (javadoc java-object-or-class-here)
> > > > Exit: Control+D or (exit) or (quit)
> > > > user=> (use 'hiccup.core)
> > > > nil
> > > > user=> ^D
> > > > Bye for now!
> > > > C:\Users\Sean\clojure>
> > > >
> > > > (and that's just to show it failing the same way on Windows 8 (with
> > > > GNU on Windows) as it does on Mac!)
> > > >
> > > > Sean
> > > >
> > > > On Sat, Jul 13, 2013 at 9:26 PM, Ryan Neufeld  > >
> > > > wrote:
> > > > > It looks like you tried to use hiccup.ocre instead of core
> > > > >
> > > > > --
> > > > > --
> > > > > 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 unsubscribe from this group and stop receiving emails from it,
> > send
> > > > an email to clojure+unsubscr...@googlegroups.com.
> > > > > For more options, visit https://groups.google.com/groups/opt_out.
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Sean A Corfield -- (904) 302-SEAN
> > > > An Architect's View -- http://corfield.org/
> > > > World Singles, LLC. -- http://worldsingles.com/
> > > >
> > > > "Perfection is the enemy of the good."
> > > > -- Gustave Flaubert, French realist novelist (1821-1880)
> > > >
> > > > --
> > > > --
> > > > 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 a topic in the
> > > > Google Groups "Clojure" group.
> > > > To unsubscribe from this topic, visit
> > > > https://groups.google.com/d/topic/clojure/YZDYufCtKRA/unsubscribe.
> > > > To unsubscribe from this group and all its topics, send an email to
> > > > clojure+unsubscr...@googlegroups.com.
> > > > For more options, visit https://groups.google.com/groups/opt_out.
> > > >
> > > >
> > > >
> > >
> > > --
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Clojure" group.
> > > To post to this group, send email to clojure

[ANN] - 17th tutorial - Enlive by REPLing - of the modern-cljs series

2013-07-14 Thread Mimmo Cosenza
Hi all, I just published the 17th tutorial of the modern-cljs series. 

https://github.com/magomimmo/modern-cljs/blob/master/doc/tutorial-17.md

It shows how to integrate input validators in a form. To be respectful of the 
progressive enhancement strategy, in this tutorial I started implementing the 
validators into the server-side code by using Enlive. In the next tutorial I'm 
going to do the same thing by using Enfocus.

My best

Mimmo
 

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: --> macro proposal

2013-07-14 Thread Jeremy Heiler
On Sat, Jul 13, 2013 at 9:08 PM, Daniel Dinnyes  wrote:
> Just made a quick search on `main arguments` on both Google and Wikipedia.
> Do you mean the arguments in `public static void main (String[] args)`? If
> not please provide some definition what do you mean by main arguments. Else
> the point is meaningless.

He means the arguments you are threading.

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: --> macro proposal

2013-07-14 Thread Jeremy Heiler
On Sat, Jul 13, 2013 at 10:49 PM, Daniel Dinnyes  wrote:
> (->>> "test-string-with-lots-of-dashes"
> x (s/split x #"-")
> y (interleave y (range))
> z (s/join #"_" z)
> z (s/join " * " ["I am serious" z "Not Kidding!!" z]))

Why not use as-> or a let in this situation?

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [ANN] CHP Web Framework Documentation Update

2013-07-14 Thread Bastien
Hi Kelker,

thanks for your work on CHP.  I've not tested it yet, because
I'm right now into learning Luminus.

Could you explicit the differences between the two frameworks?

Thanks in advance,

-- 
 Bastien

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: direction of an arrow in core.async

2013-07-14 Thread Brandon Bloom
> When I read code like (- 1 2), I tranform it into (1 - 2) in my head

I used to do this when I was first learning a lisp, but now I read "+" as 
"sum" instead of "plus" and "-" as "subtract" instead of "minus". 
Similarly, if you see (< x y), you can say "x less than y", but what about 
(<= x y z)? Instead, I read that as "ascending". With "<=", it would be 
"strictly ascending". Choosing prefix-friendly pronunciations for 
non-alphanumeric functions helps you get out of the operator mind set and 
into the applicative mindset.

In the absence of a mental infix transform, (http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: direction of an arrow in core.async

2013-07-14 Thread bernardH


On Monday, July 15, 2013 1:39:00 AM UTC+2, Brandon Bloom wrote:
>
> > When I read code like (- 1 2), I tranform it into (1 - 2) in my head

 

> […]
> In the absence of a mental infix transform, ( from a file in your shell.
>

Thx for the mnemonic !
It didn't make sense for me (either way) but this perfectly clicks.
Maybe this should be written somewhere  as a rationale/mnemonic for the 
naming convention to help people memorize the function names.

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [ANN]: Introducing lein-try

2013-07-14 Thread Sean Corfield
https://github.com/rkneufeld/lein-try/issues/3

Let me know if I can help with testing or provide any additional information.

Sean

On Sun, Jul 14, 2013 at 7:42 AM, Ryan Neufeld  wrote:
> Can you pop that in an issue on the project. In the mean time I'll see if I
> reproduce that problem.
>
> On Jul 13, 2013 11:30 PM, "Sean Corfield"  wrote:
>>
>> It doesn't work when I spell it correctly either (and I had done
>> several tests - but of course the results of misspelling it look the
>> same as it not working - and it's indicative of my day that I pasted
>> the result of a bad test! :)
>>
>> C:\Users\Sean\clojure>lein new five
>> ...
>> C:\Users\Sean\clojure>cd five
>> C:\Users\Sean\clojure\five>lein try hiccup 1.0.2
>> Retrieving lein-try/lein-try/0.1.1/lein-try-0.1.1.pom from clojars
>> Retrieving lein-try/lein-try/0.1.1/lein-try-0.1.1.jar from clojars
>> Retrieving org/clojure/clojure/1.2.1/clojure-1.2.1.jar from central
>> nREPL server started on port 51113
>> REPL-y 0.2.0
>> Clojure 1.5.1
>> Docs: (doc function-name-here)
>>   (find-doc "part-of-name-here")
>>   Source: (source function-name-here)
>>  Javadoc: (javadoc java-object-or-class-here)
>> Exit: Control+D or (exit) or (quit)
>> user=> (use 'hiccup.core)
>> FileNotFoundException Could not locate hiccup/core__init.class or
>> hiccup/core.clj on classpath:   clojure.lang.RT.load (RT.java:443)
>> user=> ^D
>> Bye for now!
>>
>> C:\Users\Sean\clojure\five>cd ..
>> C:\Users\Sean\clojure>lein try hiccup 1.0.2
>> nREPL server started on port 51183
>> REPL-y 0.2.0
>> Clojure 1.5.1
>> Docs: (doc function-name-here)
>>   (find-doc "part-of-name-here")
>>   Source: (source function-name-here)
>>  Javadoc: (javadoc java-object-or-class-here)
>> Exit: Control+D or (exit) or (quit)
>> user=> (use 'hiccup.core)
>> nil
>> user=> ^D
>> Bye for now!
>> C:\Users\Sean\clojure>
>>
>> (and that's just to show it failing the same way on Windows 8 (with
>> GNU on Windows) as it does on Mac!)
>>
>> Sean
>>
>> On Sat, Jul 13, 2013 at 9:26 PM, Ryan Neufeld 
>> wrote:
>> > It looks like you tried to use hiccup.ocre instead of core
>> >
>> > --
>> > --
>> > 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 unsubscribe from this group and stop receiving emails from it, send
>> > an email to clojure+unsubscr...@googlegroups.com.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>> >
>> >
>>
>>
>>
>> --
>> Sean A Corfield -- (904) 302-SEAN
>> An Architect's View -- http://corfield.org/
>> World Singles, LLC. -- http://worldsingles.com/
>>
>> "Perfection is the enemy of the good."
>> -- Gustave Flaubert, French realist novelist (1821-1880)
>>
>> --
>> --
>> 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 a topic in the
>> Google Groups "Clojure" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/clojure/YZDYufCtKRA/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> clojure+unsubscr...@googlegroups.com.
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
> --
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novel

Re: [ANN] CHP Web Framework Documentation Update

2013-07-14 Thread Kelker Ryan
The Luminus framework, in my opinion, is mostly just a collection of libraries. That doesn't mean Luminus isn't a great framework, but I wanted to create something that felt more like a single solution, and not just a collection of libraries. The Noir framework is now called lib-noir for a reason and I want to avoid that with CHP. The key solution that CHP provides is being able to embed Clojure code into a HTML file and have it be dynamically evaluated. Unlike PHP, you can't start a block of code (for, doseq, etc...), embed HTML, and then finish the code block. Also, the output of code isn't displayed by default. You have to explicitly use print or some other output printing function to display data. This helps prevent much of the mess that PHP is known for. The other solutions that CHP provides, such as the dynamic auto-loading of middleware, the auto-documenting and dynamically generated DB to JSON API, view generation, route generation, html form generation, and so much more, are all optional. If you just need a simple website you can remove everything in the resources folder and create a simple CHTML (Clojure HTML) file. Other than what I've mentioned above, this is what CHP currently has to offer out of the box. Keep in mind that these features are all optional and you can still use Ring and Compojure components (routes, middleware, etc...).Run Clojure inside a HTML file with the  tagsRequest params ex. ($p userid)Common web headers ex. ($ user-agent)Web Headers ex. ($$ cache-control)Environmental variables ex. (env java.vm.name)Have multiple method handlers under a single route (get, post, put, delete, and head)Routes can be defined in seperate files and namespacesStyle templates can be written in CHTML ex. chp.template/using-templateCreate SQL database schemas ex. lein schemaPerform SQL database migrations ex. lein migratePerform migration rollbacks ex. lein rollbackManipulate SQL databases with KormaSQLGenerate Page views (new,view,edit,list)Generate _javascript_ / ECMAScriptGenerate HTMLGenerate CSSThe documentation of the very Alpha framework can offer a better and more detailed list of capabilities and how to use them. https://github.com/runexec/chp#documentation15.07.2013, 02:24, "Bastien" :> Hi Kelker,>> thanks for your work on CHP.  I've not tested it yet, because> I'm right now into learning Luminus.>> Could you explicit the differences between the two frameworks?>> Thanks in advance,>> -->  Bastien



-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


Re: [ANN] CHP Web Framework Documentation Update

2013-07-14 Thread Kelker Ryan
 Here's an updated documentation list  CHTML, Routing, and Sessions CHTML & RoutesSession handling, Cookies, and Compojure Ring Ring and port configurationAuto-loading middleware Code Generation, Modules, and JSON API Generating views from a tableView bindingsView bindings ExampleEnable admin accountDatabase and Bindings tutorialHTML GenerationCSS Generation_javascript_ GenerationCHP ModulesModule PackagesJSON APIAuto Documenting API SQL Configuration, Migrations, and Manipulation SQL DB configuration and creationSQL DB MigrationsSQL ManipulationGet column syntax example General Information InstallUML RelationshipsNamespace DependenciesUnit TestsRemoving example filesLicenseHow?Tutorial 15.07.2013, 11:37, "Kelker Ryan" :The Luminus framework, in my opinion, is mostly just a collection of libraries. That doesn't mean Luminus isn't a great framework, but I wanted to create something that felt more like a single solution, and not just a collection of libraries. The Noir framework is now called lib-noir for a reason and I want to avoid that with CHP. The key solution that CHP provides is being able to embed Clojure code into a HTML file and have it be dynamically evaluated. Unlike PHP, you can't start a block of code (for, doseq, etc...), embed HTML, and then finish the code block. Also, the output of code isn't displayed by default. You have to explicitly use print or some other output printing function to display data. This helps prevent much of the mess that PHP is known for. The other solutions that CHP provides, such as the dynamic auto-loading of middleware, the auto-documenting and dynamically generated DB to JSON API, view generation, route generation, html form generation, and so much more, are all optional. If you just need a simple website you can remove everything in the resources folder and create a simple CHTML (Clojure HTML) file. Other than what I've mentioned above, this is what CHP currently has to offer out of the box. Keep in mind that these features are all optional and you can still use Ring and Compojure components (routes, middleware, etc...).Run Clojure inside a HTML file with the  tagsRequest params ex. ($p userid)Common web headers ex. ($ user-agent)Web Headers ex. ($$ cache-control)Environmental variables ex. (env java.vm.name)Have multiple method handlers under a single route (get, post, put, delete, and head)Routes can be defined in seperate files and namespacesStyle templates can be written in CHTML ex. chp.template/using-templateCreate SQL database schemas ex. lein schemaPerform SQL database migrations ex. lein migratePerform migration rollbacks ex. lein rollbackManipulate SQL databases with KormaSQLGenerate Page views (new,view,edit,list)Generate _javascript_ / ECMAScriptGenerate HTMLGenerate CSSThe documentation of the very Alpha framework can offer a better and more detailed list of capabilities and how to use them. https://github.com/runexec/chp#documentation15.07.2013, 02:24, "Bastien" :> Hi Kelker,>> thanks for your work on CHP.  I've not tested it yet, because> I'm right now into learning Luminus.>> Could you explicit the differences between the two frameworks?>> Thanks in advance,>> -->  Bastien --  --  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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.    



-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


error (init-db)

2013-07-14 Thread jayvandal
error , but don't know how to solve
error  it  goes as follows

CompilerException java.lang.RuntimeException: Unable to resolve symbol: 
init-db
in this context, compiling:(NO_SOURCE_PATH:1) 
This is the db.clg file
===
(ns jimsweb.models.db
(:require [clojure.java.jdbc :as sql]))

(def db 
{:subprotocol "postgresql"
:subname "//localhost/my_website"
:user "admin"
:password "pass"})

(defn init-db []
(try
(sql/with-connection
db
(sql/create-table
:users
[:id "SERIAL"]
[:handle "varchar(100)"]
[:pass "varchar(100)"]))
(catch Exception ex
(.getMessage (.getNextException ex)

jimsweb.server=> (init-db)
===

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [ANN] Vertigo: fast, idiomatic C-style structs

2013-07-14 Thread kovas boguta
This is pretty neat.

Anyone try using this in conjunction with mmap?

It would be nice to have some way to deal with strings & other
variable-length data.

I'm also curious if its possible to make the analog of this for fressian,
basically to avoid unpacking objects that are not necessary for the
computation at hand.






On Tue, Jul 9, 2013 at 8:56 PM, Zach Tellman  wrote:

> Last year, I gave a talk at the Conj on my attempt to write an AI for the
> board game Go.  Two things I discovered is that it was hard to get
> predictable performance, but even once I made sure I had all the right type
> hints, there was still a lot of room at the bottom for performance
> improvements.  Towards the end [1], I mentioned a few ideas for
> improvements, one of which was simply using ByteBuffers rather than objects
> to host the data.  This would remove all the levels of indirection, giving
> much better cache coherency, and also allow for fast unsynchronized
> mutability when the situation called for it.
>
> So, ten months and several supporting libraries [2] [3] later, here it is:
> https://github.com/ztellman/vertigo
>
> At a high level, this library is useful whenever your datatype has a fixed
> layout and is used more than once.  Depending on your type, it will give
> you moderate to large memory savings, and if you're willing to forgo some
> of core library in favor of Vertigo's operators, you can get significant
> performance gains on batch operations.  And, in the cases where performance
> doesn't matter, it will behave exactly like any other Clojure data
> structure.
>
> I want to point out that something like this would be more or less
> impossible in Java; reading from an offset in a ByteBuffer without the
> compile-time inference and validation provided by this library would be
> pointlessly risky.  There's not a lot of low-level Clojure libraries, but
> there's an increasing amount of production usage where people are using
> Clojure for performance-sensitive work.  I'm looking forward to seeing what
> people do with Vertigo and libraries like it.
>
> Zach
>
> [1]
> http://www.youtube.com/watch?feature=player_detailpage&v=v5dYE0CMmHQ#t=1828s
> [2] https://github.com/ztellman/primitive-math
> [3] https://github.com/ztellman/byte-streams
>
> --
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




New Functional Programming Job Opportunities

2013-07-14 Thread Functional Jobs
Here are some functional programming job opportunities that were posted

recently:



Clojure and Clojurians at Factual Needed at Factual

http://functionaljobs.com/jobs/8482-clojure-and-clojurians-at-factual-needed-at-factual



Cheers,

Sean Murphy

FunctionalJobs.com


-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.