Re: alternative syntax for Clojure? Haskell?

2014-04-05 Thread Curtis Gagliardi
It's a sincere no from me, but I can tell you I've met plenty of 
non-clojurites/lispers who sneer at lisp it seems solely due to the 
parentheses.  It seems misguided to me though.

On Saturday, April 5, 2014 1:14:36 PM UTC-7, Travis Wellman wrote:

 Francois Rey,

 Yes I've been following that project. They're going for purity, which 
 means reimplementing a lot of standard java stuff in Frege. Cool project, 
 but what I really want is Clojure. Everything Clojure without the parens. 
 So you'd get lists, and homoiconicity, and all the Clojure libs, but it 
 would look different.

 Part of posting here is to gauge whether, if I wrote such a thing to 
 scratch my own itch, anyone else would like it. So far I'm getting a pretty 
 sincere no it seems. It's partially a bad survey because the people here 
 are the people who like it here.

 Greg, Xtext is new to me, I'll look at it. Antlr is used in a project I'm 
 getting paid for right now, so I might try that.

 Gary, I think this is the essence of the maintainability problem. The 
 terseness of Clojure is pleasurable to the programmer, and they don't 
 compensate with documentation or longer function names. What you get is a 
 short statement that requires detangling levels of macros and abstractions 
 to understand. Honestly I wish programmers had to pay $20 to write a macro. 
 Macros are great but should very very rarely be used. Granted none of this 
 would be fundamentally changed with a new syntax, but I feel like if one 
 didn't begin a line with a paren, one might begin more lines instead of 
 nesting deeper; I could easily be wrong about that.

 Travis


-- 
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/d/optout.


Re: Latest web framework for clojure

2014-02-26 Thread Curtis Gagliardi
If you're interested in the url-generation and data-based routing, there 
are some Compojure competitors like Bidi which have those features without 
bringing on something as large as Pedestal: https://github.com/juxt/bidi 
(the readme has a nice comparison chart). 

On Tuesday, February 25, 2014 11:57:18 PM UTC-8, Jan Herich wrote:

 It depends also on your requirements. For example if you want your app to 
 work in many 
 deployment scenarios (standalone Jetty  or Tomcat, J2EE web containers...) 
 and you may 
 have to use servlet 3.0 API asynchronous features, nothing beats pedestal 
 currently.

 The concept of interceptors is little harder to grok then simple ring 
 handlers (which are reused
 to the greatest possible extent anyway), but they really make sense and 
 truly decomplect
 execution order, unlike traditional ring wrapping handlers.

 The routing systems is also more transparent (data based) then Compojure 
 macro routing
 and the url generation facility is nice.

 Sometimes i hear people say that pedestal is unclojurish and complex, 
 but i think they
 just don't get the difference between complex and easy. Overall, i think 
 that pedestal 
 represents core clojure philosophy better then any other clojure server 
 side framework.

 Dňa streda, 26. februára 2014 2:13:30 UTC+1 Aravindh S napísal(-a):

 Hi All,
I have been reading clojure for sometime now. I am at a point where I 
 want to learn a web framework. I see many options available for clojure 
 where few are built upon others. So if I am to learn one, which framework 
 does the community recommend? 

 Thanks
 Aravindh.S



-- 
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: Refactoring as an nREPL middleware

2014-02-08 Thread Curtis Gagliardi
Thanks, I'll definitely take a look at those libraries, I actually didn't 
do too much searching for prior art, I'll have to start now. 

You're dead on with whitespace and reader macros being a problem. I know I 
heard of someone working on trying to build a clojure formatter, so maybe 
something like that will come to fruition, otherwise I was just going to 
return something formatted in a super basic way and punt that problem to 
the user.  The reader macros though is a bigger problem that I have no idea 
how to deal with.  I ran into that with the cycle-privacy refactor.  If you 
try to read '(def ^:private a), you always get back '(def a).  I ended up 
evaling the form and calling meta on it to get the privacy, but that felt 
wrong and now that you point out #_, it's clear it's not going to work in a 
lot of cases.  I'll have to take a look at clj.tools.analyzer, thought I 
was hoping there might be some way to just turn off reader macros.  I think 
I might make a separate list post and see if anyone has ideas there. 

On Friday, February 7, 2014 3:10:49 PM UTC-8, John Hume wrote:

 I haven't attempted any code manipulation, just analysis and indexing, but 
 I embarked on a similar idea here: 
 https://github.com/duelinmarkers/insfactor and here: 
 http://github.com/duelinmarkers/insfactor.el. (Nothing Vim-related there, 
 the similar part is trying to put as much as possible of the smarts into 
 the same JVM as the project.) It indexes a simple clojure project and 
 provides a find-usages command, the idea being that find-usages is the 
 first useful step toward rename-var and move-var commands. (I say simple 
 because it still barfs on some common stuff, including defprotocol, IIRC.)

 Focusing on what you're doing in http://github.com/cgag/nrepl-refactor, 
 the mess I came upon and backed away from when I initially played with 
 transforming code in Clojure is that the forms are easy to manipulate but 
 formatting is hard to maintain. There are also several non-whitespace bits 
 of source that the reader will hide away from you (including comments and 
 #_ forms) but that a proper refactoring tool won't clobber.

 If you haven't already, you might take a look at 
 https://github.com/cgrand/sjacket.

 I've been hoping that the new 
 https://github.com/clojure/tools.analyzerhttps://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fclojure%2Ftools.analyzersa=Dsntz=1usg=AFQjCNGdQqvOgv4UWDokQ46-YhCAp7AqLQ
  work 
 will support some of what source manipulation tools are likely to need, but 
 I haven't looked into it. For example, one hassle with 
 jvm.tools.analyzer (at least the now outdated version I've been using) is 
 that the reader doesn't provide line and column metadata in many places 
 where you'd expect to find it. Another is that it can only show you the 
 post-macro-expansion view of the world.



 On Fri, Feb 7, 2014 at 3:51 PM, Curtis Gagliardi 
 gagliard...@gmail.comjavascript:
  wrote:

 Hey everyone, I just wanted to get some feedback on whether or not this 
 is a good idea.  I've seen clj-refactor.el recommended a decent amount, but 
 as a dyed-in-the-wool take-no-prisoners vim user, I can't use it.  I've 
 always thought it was weird that refactoring was so tightly coupled to 
 editors and IDEs, so I thought I'd try writing some refactors as an nrepl 
 middleware, that would ideally be able to be used across editors.  I've 
 only re-implemented the threading and some of the cycling refactors from 
 clj-refactor.el, but it's to the point where I'm going to investigate 
 actually integrating with vim or light table.  I've never written any 
 plugins for either of these editors so I might discover there are good 
 reasons I haven't seen refactoring done as a client/server type thing.  
 Anyway, the code is here: https://github.com/cgag/nrepl-refactor , if 
 anyone has any has any feedback I'd love to hear it, and if anyone has 
 vimscript or lighttable plugin experience and wants to help, that'd be 
 great as well.

 Curtis

 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@googlegroups.comjavascript:
 Note that posts from new members are moderated - please be patient with 
 your first post.
 To unsubscribe from this group, send email to
 clojure+u...@googlegroups.com javascript:
 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+u...@googlegroups.com javascript:.
 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

Refactoring as an nREPL middleware

2014-02-07 Thread Curtis Gagliardi
Hey everyone, I just wanted to get some feedback on whether or not this is 
a good idea.  I've seen clj-refactor.el recommended a decent amount, but as 
a dyed-in-the-wool take-no-prisoners vim user, I can't use it.  I've always 
thought it was weird that refactoring was so tightly coupled to editors and 
IDEs, so I thought I'd try writing some refactors as an nrepl middleware, 
that would ideally be able to be used across editors.  I've only 
re-implemented the threading and some of the cycling refactors from 
clj-refactor.el, but it's to the point where I'm going to investigate 
actually integrating with vim or light table.  I've never written any 
plugins for either of these editors so I might discover there are good 
reasons I haven't seen refactoring done as a client/server type thing.  
Anyway, the code is here: https://github.com/cgag/nrepl-refactor , if 
anyone has any has any feedback I'd love to hear it, and if anyone has 
vimscript or lighttable plugin experience and wants to help, that'd be 
great as well.

Curtis

-- 
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: standard indentation tool

2014-01-28 Thread Curtis Gagliardi
It'd be cool to build a frormatter as an nrepl middleware and get 
consistent indents across editors and not have to hardcode custom 
indentations for macros. 

On Monday, January 27, 2014 8:47:31 PM UTC-8, bob wrote:

 Hi All,

 Should clojure have a standard format tool like go lang, it will waste 
 time.

 Thanks


-- 
-- 
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: [Large File Processing] What am I doing wrong?

2014-01-27 Thread Curtis Gagliardi
If ordering isn't important, I'd just dump them all into a set instead of 
manually checking whether or or not you already put the url into a set. 


On Sunday, January 26, 2014 10:46:46 PM UTC-8, danneu wrote:

 I use line-seq, split, and destructuring to parse large CSVs.

 Here's how I'd approach what I think you're trying to do:

 (with-open [rdr (io/reader (io/resource csv :encoding UTF-16))]
 (let [extract-url-hash (fn [line]
  (let [[_ _ _ url  _] (str/split line 
 #\t)]
[(m/md5 url) url]))]
   (- (drop 1 (line-seq rdr))
(map extract-url-hash)
(into {}

 https://gist.github.com/danneu/8644022

 On Tuesday, January 21, 2014 12:55:00 AM UTC-6, Jarrod Swart wrote:

 I'm processing a large csv with Clojure, honestly not even that big (~18k 
 rows, 11mb).  I have a list of exported data from a client and I am 
 de-duplicating URLs within the list.  My final output is a series of 
 vectors: [url url-hash].

 The odd thing is how slow it seems to be going.  I have tried 
 implementing this as a reduce, and finally I thought to speed things up I 
 might try a with-open and a loop-recur.  It doesn't seem to have done 
 much in my case.  I know I am doing something wrong I'm just not sure what 
 yet.  The best I can do is about 4 seconds, which may only seem slow 
 because I implemented it in python first and it takes a half second to 
 finish.  Still this is one of the smaller files I will likely deal with so 
 I'm worried that as the files grow it may get too slow.

 The code is here on ref-heap for easy viewing: 
 https://www.refheap.com/26098

 Any advice is appreciated.



-- 
-- 
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: RESTful API Auth with Friend and Liberator

2014-01-17 Thread Curtis Gagliardi
Exactly the kind of article I was going to looking for in a few days, 
excellent.

On Friday, January 17, 2014 1:27:10 PM UTC-8, Sam Ritchie wrote:

  Hey guys,

 Those of you working on webapps might find this interesting:


 http://sritchie.github.io/2014/01/17/api-authentication-with-liberator-and-friend/

 Enjoy!
 -- 
 Sam Ritchie (@sritchie)
 Paddleguru Co-Founder
 703.863.8561
 www.paddleguru.com
 Twitter http://twitter.com/paddleguru // 
 Facebookhttp://facebook.com/paddleguru
  

-- 
-- 
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: How to handle configuration in Clojure?

2014-01-17 Thread Curtis Gagliardi
I've been using carica (https://github.com/sonian/carica) and have config 
map like {:dev ... :prod ...} and just using a single environmental 
variable to determine which of those config maps to use. 

On Friday, January 17, 2014 5:06:31 AM UTC-8, Malcolm Sparks wrote:

 There's also Jig : https://github.com/juxt/jig

 Jig's recommendation is for configuration to be held in EDN files.

 I much prefer EDN over environment variables. Environment variables feel 
 awkward when there you have lots of configuration, usually in the form of a 
 tree.

 Usually it makes sense to have one configuration file per environment. 
 That can make it hard to keep configuration files up to date, so judicious 
 use of the #=() Clojure reader macro can allow you to programmatically 
 deviate from a default configuration - often the delta from a default 
 configuration is more informative. There are more details in Jig's 
 README.md file.

 I agree with the comments against using dynamic vars. They reduce the 
 ability to reason about functions and are precarious when dealing with 
 threads - binding conveyance is tricky and small mistakes can lead to 
 elusive bugs.

 I pass configuration as a single argument into types/records that declare 
 lifecycle methods. I have found this pattern to serve me well in over a 
 dozen projects. Since stumbling on this pattern I have had no need to 
 resort to dynamic vars for environment config, and my projects have been 
 smaller, more reliable and easier to reason about.


 On Tuesday, January 14, 2014 9:04:45 AM UTC, James Trunk wrote:

 Thanks for all the great links and ideas you have all posted, now I have 
 plenty of reading and thinking to do!

  I am curious about what you mean by 'thread safety'.
 Perhaps thread safety is the wrong term, but what I meant was the 
 limitations dynamic binding introduces around thread dispatching, which 
 Stuart Sierra explains in this blog 
 posthttp://stuartsierra.com/2013/03/29/perils-of-dynamic-scope
 .

 Cheers,
 James

 On Monday, January 13, 2014 7:10:38 PM UTC+1, Stefan Kanev wrote:

 On 13/01/14, James Trunk wrote: 
  The downsides to dynamic vars seem to be: hiddenness, thread safety, 
 and 
  more complex tests (binding before each test). 

 I am curious about what you mean by 'thread safety'.  As far as I know, 
 dynamic variables are thread-local, which means that they are 
 thread-safe, at least to some extend.  I assume you mean something 
 specific? 

 -- 
 Stefan Kanev  ¦  @skanev  ¦  http://skanev.com/ 
 If a program manipulates a large amount of data, it does so in a small 
 number 
 of ways. 



-- 
-- 
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] DACOM: A skeleton app, Leiningen template for Datomic, Compojure, and Om

2014-01-10 Thread Curtis Gagliardi
That's my stack right now, I'll have to check this out and take notes, see 
what we're doing differently.  This is all pretty uncharted territory it 
seems.  Thanks for putting this out there.

On Thursday, January 9, 2014 9:06:34 PM UTC-8, Kevin Bell wrote:

 A Leiningen template featuring all of the most popular Clojure 
 technologies that all of the coolest kids are using:

 sample project repo https://github.com/bellkev/dacom

 or

 `lein new dacom my-project`


-- 
-- 
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: Good learning resources for Clojure novice but with a long background i programming, both OO and some Fp?

2014-01-10 Thread Curtis Gagliardi
I really think Clojure Programming is the best Clojure book out there.  If 
you read that thing most (or all) of the way through, you'll have a very 
solid understanding of Clojure.  

On Friday, January 10, 2014 4:52:53 AM UTC-8, christian jacobsen wrote:

 I have +10 years experience of OO programming (C++, C# and a little Java) 
 and a couple of years of FP programming (mainly F#, some Scala and a little 
 Haskell). 
 Are there any resources for learning Clojure that are particular good for 
 someone with the above background?


-- 
-- 
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: Good learning resources for Clojure novice but with a long background i programming, both OO and some Fp?

2014-01-10 Thread Curtis Gagliardi
I also want to second watching all of Rich Hickey's talks, especially are 
we there yet and simple made easy, they really help you get the 
philosophies behind the language.  For me, I found myself agreeing with all 
the principles of simplicity he talks about, and it increased both my 
motivation to the learn the language and my understanding of why it is the 
way it is.  

On Friday, January 10, 2014 11:20:47 AM UTC-8, Curtis Gagliardi wrote:

 I really think Clojure Programming is the best Clojure book out there.  If 
 you read that thing most (or all) of the way through, you'll have a very 
 solid understanding of Clojure.  

 On Friday, January 10, 2014 4:52:53 AM UTC-8, christian jacobsen wrote:

 I have +10 years experience of OO programming (C++, C# and a little Java) 
 and a couple of years of FP programming (mainly F#, some Scala and a little 
 Haskell). 
 Are there any resources for learning Clojure that are particular good for 
 someone with the above background?



-- 
-- 
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: Om, a ClojureScript binding to Facebook's React

2014-01-06 Thread Curtis Gagliardi
I watched a few talks from facebook people about React and was impressed, 
lots of talk about the simplicity of just rerendering everything and pure 
functions.  I think this is the first time I've been excited about a 
javascript framework, looking forward to trying it out with Om. 

On Sunday, January 5, 2014 9:05:06 PM UTC-8, David Pidcock wrote:

 Ha! Just saw your Sortable example popup in Git! 

 Very cool. 



 On Thursday, January 2, 2014 4:00:45 PM UTC-8, David Pidcock wrote: 
  Very nice. Relatively easy to follow.  Basically it's re-implementing 
 the drag-list behaviour  in React.  I had thought to re-use some existing 
 code, provided I could inform React that the DOM was changing. (This is the 
 approach used by the example in the fiddler, albeit with jquery instead of 
 goog.closure as the UI manipulation library) 
  
  
  I'm very interested to see what you do with this, in Om. 
  This example is complex enough that following along would most likely 
 fill in the conceptual gaps for me, that the TODO example lacks. 
  
  
  Again - inspiring work..  
  
  
  -- David 
  
  
  On Monday, December 30, 2013 10:02:37 PM UTC-8, David Nolen wrote: 
  
  From a React dev: 
  
  https://www.khanacademy.org/preview/content/items/xfa03b103 
  
  
 https://github.com/Khan/perseus/blob/master/src/widgets/orderer.jsx#L6-L439 
  
  
  
  
  I'm sure this can be adapted for Om. I may write up a simpler Om example 
 in the future. 
  
  
  David 
  
  
  
  On Tue, Dec 31, 2013 at 12:43 AM, David Pidcock eraz0...@gmail.com 
 wrote: 
  
  
  On Thursday, December 19, 2013 11:12:12 AM UTC-8, David Nolen wrote: 
  
   Enjoy, 
 http://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/ 
  
   
  
   
  
   
  
   David 
  
  
  
  I've been playing around with some basics. I'm still a relative n00b 
 when it comes to functional programming, and I've never looked at React 
 before. 
  
  
  
  Very cool stuff. 
  
  
  
  I managed to get Om+React to display a list of items that are sorted by 
 a given key, and I have a content-editable span which updates the state of 
 the owner with new value of that key for a given item, and voila! the list 
 item moves to the correct position. (as expected) 
  
  
  
  
  Now here's the tricky part... 
  
  I want to implement a drag-list, where I can drag-drop items into a new 
 position, and update the key based on the new position. I have that 
 algorithm working in a different project (using goog.DragListGroup) , but 
 React does not like you to manipulate the DOM outside it's knowledge. 
  
  
  
  
  I found this : 
  
  
 https://groups.google.com/forum/#!searchin/reactjs/sortable/reactjs/mHfBGI3Qwz4/rXSr-1QUcKwJ
  
  
  
  
  which lead to 
  
  http://jsfiddle.net/LQxy7/ 
  
  
  
  Unfortunately,  I can't get this to work with Om. I am having trouble 
 navigating the data structures. 
  
  
  
  How are props created/accessed? I followed the TodoMVC example, but 
 that seems to be using state, which I am given to understand should be 
 kept as high in the hierarchy as possible (per the React recommendations). 
  I tried something like  (:value (om/get-props this)) from within IRender, 
 but that doesn't work. Also : (om/get-props this [:items] )  (following the 
 idiom established by get-state. 
  
  
  
  
  I'm probably missing something obvious, so I thought I'd pop in here to 
 see if there's someone who can point me in the right direction. 
  
  
  
  
  
  -- 
  
  
  -- 
  
  You received this message because you are subscribed to the Google 
  
  Groups Clojure group. 
  
  To post to this group, send email to clo...@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+u...@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+u...@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: Seeking remote Clojure work

2014-01-04 Thread Curtis Gagliardi
I'm also interested in Clojure contract work (though local would be fine if 
it's in SF), do we have any sort of place/list for Clojure jobs or is the 
supply low enough that this list is the main place?

On Saturday, January 4, 2014 9:39:38 AM UTC-8, Iro Wright wrote:

 Thanks for the tip Marcus.

 On Friday, January 3, 2014 1:52:03 AM UTC-5, Marcus Blankenship wrote:

 Iro, you might check out Cognitect…

 http://cognitect.com/jobs


 On Jan 2, 2014, at 2:38 PM, Iro Wright iro.w...@gmail.com wrote:

 Anyone out there hiring remotely for contract, part time, or full time?
 Please leave an email address - I'll reply with my resume and GitHub 
 handle.

 Thanks

 -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


 Marcus Blankenship
 \\\ Partner, Problem Solver, Linear Thinker
 \\\ 541.805.2736 \ @justzeros \ skype:marcuscreo
  


-- 
-- 
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: How do I serve clojure pages with nginx

2013-12-18 Thread Curtis Gagliardi
I build an uberjar of a web server that uses jetty with compojure and run 
it on port 3000, then I have nginx configured to proxy it like so:

https://gist.github.com/cgag/8031034

-- 
-- 
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: How do I serve clojure pages with nginx

2013-12-18 Thread Curtis Gagliardi
I don't know how to configure an init script, but I just run the command 
`java -jar mywebserver.jar` in a tmux session manually and then detach.

For how to setup an uberjar to run a web server, there's a nice tutorial on 
clojure-doc.  You just need to make sure you have your :main class 
specified in project.clj and have :gen-class on the right files.   Check 
out the deploy your webapp section: 
http://clojure-doc.org/articles/tutorials/basic_web_development.html 

On Wednesday, December 18, 2013 2:35:11 PM UTC-8, Curtis Gagliardi wrote:

 I build an uberjar of a web server that uses jetty with compojure and run 
 it on port 3000, then I have nginx configured to proxy it like so:

 https://gist.github.com/cgag/8031034


-- 
-- 
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] Slamhound 1.5.0 + screencast + Vim plugin

2013-11-30 Thread Curtis Gagliardi
Great screencast, thanks.  Will definitely check this release out, I tried 
it a few months ago and failed to get it to run.  Looks really promising 
though.  

On Friday, November 29, 2013 8:14:36 PM UTC-8, guns wrote:

 Hello, 

 I am happy to announce version 1.5.0 of Slamhound, technomancy's amazing 
 ns rewriting tool. 

 ;; ~/.lein/profiles.clj 
 {:user {:dependencies [[slamhound 1.5.0]]}} 

 This is a *major* bugfix release. If you've tried Slamhound in the past 
 and felt frustrated, now is a great time to give it another try. 

 If you're unfamiliar with Slamhound, I've posted a short screencast 
 here: 

 https://vimeo.com/80650659 

 Many thanks to Phil Hagelberg for allowing me to take the reins for this 
 release. 

 Enhancements since the last version include: 

 - Greatly improved detection and disambiguation of missing ns 
   references. Slamhound is now much better at DWIM. 

 - References in the existing ns form are always preferred over other 
   candidates on the classpath. 

 - Mass-referred namespaces (via :use or :refer :all) are preserved 
   as (:require [my.ns :refer :all]). Simply remove it from the ns 
   form to get a vector of explicit refers. 

 - File comment headers, ns metadata maps, docstrings, and :require 
   flags (:reload et al), are correctly preserved. 

 - Multiple options per require libspec are emitted correctly. 
   e.g. (:require [clojure.test :as t :refer [deftest]]) 

 - Classes created via defrecord/deftype etc are correctly found. 

 - Capitalized vars that shadow class names are no longer ignored. 

 A full changelog is available here: 

 https://github.com/technomancy/slamhound/blob/master/CHANGES 

 Finally, for Vim users there is a new plugin for Slamhound integration: 

 https://github.com/guns/vim-slamhound 

 It was always easy to use Slamhound from fireplace.vim, but now it's 
 just a Pathogen infect away. 

 Cheers, 

 guns 


-- 
-- 
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: Is The Joy if Clojure up to date?

2013-11-30 Thread Curtis Gagliardi
I just want to second the recommendation of Clojure Programming as a first 
book before you dive into JoC (2nd edition).

On Saturday, November 30, 2013 2:43:08 PM UTC-8, Sean Corfield wrote:

 +1 for Manning's MEAP approach - I've bought most of my Manning books 
 through the early access program over the years. 

 Also +1 for JoC not really being a beginner's book. I generally 
 recommend Clojure Programming (Emerick, Carper, Grand) as a first 
 book. Programming Clojure 2nd ed is good too. I expect Clojure in 
 Action 2nd ed to be worthwhile (I liked the 1st ed but it appeared 
 just after 1.3 hit and a lot of the examples in the book no longer 
 worked properly - Manning knew the book would be out of date at 
 release so I was disappointed they didn't listen to people who 
 suggested they delay release until it could be updated to 1.3). 

 FWIW, JoC was my first Clojure book - but I had a solid background in 
 both Lisp and FP, although I hadn't done much with either for many, 
 many years... 

 Buy as many of the latest editions as you can afford :) 

 Sean 

 On Sat, Nov 30, 2013 at 10:59 AM, John Mastro 
 john.b...@gmail.comjavascript: 
 wrote: 
  Manning (the publisher) has an interesting early-access program called 
 MEAP. I used it to buy [1] electronic access to both the first edition and 
 the second edition (the in-progress version immediately, plus the final 
 version when it's released). I've been very happy with the arrangement. 
  
  [1] http://www.manning.com/fogus2/ 
  
  - John 
  
  On Nov 30, 2013, at 10:34 AM, Mars0i mars...@logical.net javascript: 
 wrote: 
  
  Amazon claims that the publication date of the second edition is Feb. 
 28, 2014. 
  
  -- 
  -- 
  You received this message because you are subscribed to the Google 
  Groups Clojure group. 
  To post to this group, send email to clo...@googlegroups.comjavascript: 
  Note that posts from new members are moderated - please be patient with 
 your first post. 
  To unsubscribe from this group, send email to 
  clojure+u...@googlegroups.com javascript: 
  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+u...@googlegroups.com javascript:. 
  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 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: quick macro review

2013-11-29 Thread Curtis Gagliardi
Beautiful, thanks guys.

On Thursday, November 28, 2013 10:26:05 PM UTC-8, Alex Baranosky wrote:

 This also works, I believe:

 (defmacro migrate [ migration-syms]
   (let [migration-vars (for [sym migration-syms]
`(var ~sym))]
 `(migrate* ~@migration-vars)))


 On Thu, Nov 28, 2013 at 5:22 PM, juan.facorro 
 juan.f...@gmail.comjavascript:
  wrote:

 Hi Curtis,

 The *apply* is unnecessary if you use *unquote-splice* (*~@*), also 
 instead of the *into* and *for* usage you could just *map* over the list 
 of symbols.

 Here's how I would do it:

 (defmacro migrate [ syms]
   `(migrate* ~@(map (partial list 'var) syms)))

 (macroexpand-1 '(migrate a b c)) 

 ;= (user/migrate* (var a) (var b) (var c))


 Hope it helps,

 Juan

 On Friday, November 29, 2013 5:26:14 AM UTC+8, Curtis Gagliardi wrote:

 I wrote a macro last night and got the feeling I did what I did in a 
 suboptimal way.

 I have have a migration function that I stole from technomancy that 
 takes in the vars of migration functions: 
 (migrate #'create-db #'add-users-table #'etc)

 It uses the name of the var from the metadata to record which migrations 
 have been run.  I wanted to try to make it so you didn't have to explicitly 
 pass in the vars, and just have the migrate function call var for you.  
 I've since decided this is a bad idea but I wrote the macro anyway just for 
 fun.  My first question is: could this be done without a macro?  I didn't 
 see how since if you write it as a function, all you recieve are the actual 
 functions and not the vars, but I thought I'd ask to be sure.  Assuming you 
 did have to write a macro, does this implementation seem reasonable?  I 
 felt strange about using (into [] ...).  

 https://www.refheap.com/21335

 Basically I'm trying to get from (migrate f g h) to (migrate* (var f) 
 (var g) (var h)), I'm not sure I'm doing it right.

 Thanks,
 Curtis.

  -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@googlegroups.comjavascript:
 Note that posts from new members are moderated - please be patient with 
 your first post.
 To unsubscribe from this group, send email to
 clojure+u...@googlegroups.com javascript:
 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+u...@googlegroups.com javascript:.
 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.


quick macro review

2013-11-28 Thread Curtis Gagliardi
I wrote a macro last night and got the feeling I did what I did in a 
suboptimal way.

I have have a migration function that I stole from technomancy that takes 
in the vars of migration functions: 
(migrate #'create-db #'add-users-table #'etc)

It uses the name of the var from the metadata to record which migrations 
have been run.  I wanted to try to make it so you didn't have to explicitly 
pass in the vars, and just have the migrate function call var for you.  
I've since decided this is a bad idea but I wrote the macro anyway just for 
fun.  My first question is: could this be done without a macro?  I didn't 
see how since if you write it as a function, all you recieve are the actual 
functions and not the vars, but I thought I'd ask to be sure.  Assuming you 
did have to write a macro, does this implementation seem reasonable?  I 
felt strange about using (into [] ...).  

https://www.refheap.com/21335

Basically I'm trying to get from (migrate f g h) to (migrate* (var f) (var 
g) (var h)), I'm not sure I'm doing it right.

Thanks,
Curtis.

-- 
-- 
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: Clojure and freelancing

2013-09-08 Thread Curtis Gagliardi
It's definitely suitable for the web.  I've been using it for my own 
personal web projects for a while.  I've never done any significant 
freelancing work, though I'm very interested in it.  I'm curious though if 
clients are open to having their stuff built in a rather niche language 
where they might have trouble finding people once you leave the project.  I 
get the feeling lots of people are out there specifically looking for rails 
devs, but not many looking specifically for Clojure.  Would definitely be 
interested on hearing anyone's experience doing non-full-time work with 
Clojure.  

On Sunday, September 8, 2013 1:31:13 PM UTC-7, Mateusz Dobek wrote:

 Is Clojure good choice for one-man-webdevelopment-team?

 I switched form Ruby on Rails, and now I'm learing Clojure.  It seems to 
 be really powerfull language, but will it suits for web? 
 Wanna give it a try in Pedestal framework.


-- 
-- 
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: How do you configure your Ring apps?

2013-09-08 Thread Curtis Gagliardi
I do basically exactly what Christopher Allen described.

On Saturday, September 7, 2013 4:53:25 PM UTC-7, Alexandr Kurilin wrote:

 I'm curious to find out how you folks decided to organize configuration 
 for your Ring applications, assuming you also use configuration management 
 like Puppet/Ansiblet etc to deploy them.

 So far I've been using a combination of daemontools' envdir (through 
 runit) + weavejester's environ https://github.com/weavejester/environfor 
 things like db address, db password, cookie secret keys, logging level 
 etc. Each one is an individual file in root-only folder that runit envdirs 
 from.

 I honestly can't decide whether a single configuration file (YAML, EDN, 
 whatever) would be more appropriate for this scenario or if I should go 
 ahead and continue keeping each configuration value in its own file and use 
 env to load them.

 What are people's thoughts on this? Any reason why one or the other would 
 be better, or is there an even better option out there I'm not considering?


-- 
-- 
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: map from list of maps

2013-07-25 Thread Curtis Gagliardi
You can use whatever functions you want with juxt:

user= (into {}  (map (juxt #(% a) #(% b)) [{a blah b ack} {a 
red b blue}]))
{blah ack, red blue}


On Thursday, July 25, 2013 2:55:18 PM UTC-7, Brian Craft wrote:

 Ah, interesting. Only works for keys that are functions.

 On Thursday, July 25, 2013 2:48:10 PM UTC-7, Gary Trakhman wrote:

 user (into {}  (map (juxt :a :b) [{:a blah :b ack} {:a red :b 
 blue}]))
 {blah ack, red blue}



 On Thu, Jul 25, 2013 at 5:34 PM, Brian Craft craft...@gmail.com wrote:

 Is there a better way to do this, making a map of certain keys from a 
 list of maps?

  (apply hash-map (mapcat (fn [x] [(x :a) (x :b)]) [{:a blah :b ack} 
 {:a red :b blue}]))
 {red blue, blah ack}

 -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@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+u...@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+u...@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: In what OS do you code?

2013-06-17 Thread Curtis Gagliardi
Linux Mint everywhere, but any distro is fine as long as I can run a tiling 
window manager (i3) and vim on it.

People complaining about the hassle really should give Ubuntu/Mint or one 
of the other really user focused distros a try if they haven't recently, 
it's really not very difficult anymore.

On Friday, June 14, 2013 6:46:37 AM UTC-7, Erlis Vidal wrote:

 Hi, 

 I'm a bit curious to know in what OS do you code. Do you prefer iOS, 
 Linux, Windows? Why is that? Because the tools? The environment? 

 Thanks!


-- 
-- 
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] lein-pedantic is now deprecated

2013-05-31 Thread Curtis Gagliardi
Another +1 for those features.

On Wednesday, May 29, 2013 6:25:22 PM UTC-7, Nelson Morris wrote:

 Good news everybody! As of leiningen 2.2.0 using `lein deps :tree` will 
 perform version checks and version range detection. Therefore, I have 
 deprecated lein-pedantic.  I appreciate all of the users of the plugin that 
 found it useful.

 I believe there are two pieces of functionality that do not currently have 
 a replacement:
 1) ability to fail the task when a bad dependency resolution happens
 2) exact instructions of what to place in project.clj to make things work

 If you are interested in these, please let me know here, and I'll see 
 about adding them in a future leiningen release.

 -
 Nelson Morris


-- 
-- 
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: Why is this code so slow?

2013-02-03 Thread Curtis Gagliardi
For some reason, by splitting out the inner loop into a function 
shaved 6 more seconds (from 34s to 28s) on my low-config 32-bit 
laptop: 

Pulling every-d? out into it's own function slowed things down a few 
seconds for me.  Strange stuff.

-- 
-- 
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: Why is this code so slow?

2013-02-03 Thread Curtis Gagliardi
Was on clojure 1.4, just tried on 1.5.0-RC4 and its a few hundred 
miliseconds faster in its own 
function.  

4921.78197 msecs vs  5251.267893 msecs

On Sunday, February 3, 2013 11:52:11 AM UTC-6, Curtis Gagliardi wrote:

 For some reason, by splitting out the inner loop into a function 
 shaved 6 more seconds (from 34s to 28s) on my low-config 32-bit 
 laptop: 

 Pulling every-d? out into it's own function slowed things down a few 
 seconds for me.  Strange stuff.

-- 
-- 
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: Migrate from IDEs to emacs or vim (already experienced with it) ?

2013-02-02 Thread Curtis Gagliardi
I've been using vim pretty exclusively for the last 5 years or so, but in 
the last few weeks I've been using emacs with evil mode and I couldn't be 
happier.  It's a beautiful thing to have emacs extreme extensibility with 
vim's vastly superior keybindings.  I have my config here if you're 
interested https://github.com/cgag/dotfiles/blob/master/.emacs

Still, if you don't want to deal with emacs, vim is definitely viable. 
 Vimclojure is a pain to get set up, but once you do it's solid.  Foreplay 
is definitely worth checking out, but I couldn't stand not having a real 
repl buffer personally.

-- 
-- 
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: Why is this code so slow?

2013-02-02 Thread Curtis Gagliardi
I took your version Feng and used rem instead of mod and added a type hint 
and got down from:
23217.321626 = 11398.389942

No idea where to go from here though.  I'm surprised there's such a 
difference even not using any sort of collection.

(defn smallest-multiple-of-1-to-n-hinted-rem
  [^long n]
  (loop [i n]
(if (loop [d 2]
  (cond ( d n) true
(not= 0 (rem i d)) false
:else (recur (inc d
  i
  (recur (inc i

-- 
-- 
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: screencast: friend and creating a login form

2013-01-30 Thread Curtis Gagliardi
Definitely agree that it'd have helped when I was first starting to use 
friend.  I spent a lot of time reading his source.  If you plan on doing 
more about friend it'd definitely be good to show how to authorize a 
specific user rather than just at the role level, as well as something 
about how to redirect after logging in use ::redirect-on-auth?.  Both those 
things took me a while to figure out.

Keep it up, I'm look forward to seeing more of them.

On Tuesday, January 29, 2013 2:55:13 PM UTC-6, Nelson Morris wrote:

 I've released a screencast on friend and using its interactive-form 
 workflow to create a login form. 
 http://www.clojurewebdevelopment.com/videos/friend-interactive-form 

 I've got more in various stages of completion, so I'd be interested in 
 hearing feedback. 

 Thanks, 
 Nelson Morris 


-- 
-- 
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: Blog Post: The Magic of Macros: Lighting-Fast Templating in ClojureScript

2013-01-26 Thread Curtis Gagliardi
Great use of macros, and I found Chris Granger's protocol commit 
enlightening as well, thanks.

On Tuesday, January 22, 2013 12:45:34 PM UTC-6, Aria Haghighi wrote:

 Hi all,

   I've done a follow-up post on the Prismatic blog about our dommy, our 
 ClojureScript templating library. We added some macros to parse nested 
 vector data structures at compile time
 into direct DOM creation code. The resulting speedup is pretty dramatic 
 about 5x, bring ClojureScript templating to roughly 3x faster than a jQuery 
 baseline. This is a trick I know Hiccup and some other libraries do but I 
 thought it might be worth document/explaining this kind of application of 
 macros. 


 http://blog.getprismatic.com/blog/2013/1/22/the-magic-of-macros-lighting-fast-templating-in-clojurescript

 Thanks, Aria


-- 
-- 
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: Current status of Clojure on Android?

2012-11-27 Thread Curtis Gagliardi
How do you use clojurescript on android?  SL4A?  How does it compare to a 
native app?  I'm looking to try to write an android app but want to avoid 
java, but it sounds like clojure isn't really ready for production on 
android.

On Monday, November 26, 2012 8:14:07 PM UTC-6, Herwig Hochleitner wrote:

 2012/11/26 John Gabriele jmg...@gmail.com javascript:

 What are currently the main limitations in creating and running
 Clojure programs on Android? (Does some limited subset of Clojure
 work? Does the bytecode that Clojure produces run on Dalvik?)


 Clojure on Android is alive and well as far as I'm aware. I'm not 
 currently using it, but last time I checked, even eval, hence the REPL 
 worked. 
 Mr. Solano Gómez pulled that off by dexing the dex utility for use on 
 android.

 The main drawback is startup time, which is a couple of seconds on my 
 Galaxy Nexus.

 Therefore, and because of portability, I write my current android project 
 in ClojureScript.
  

 Is it currently possible to write your Android app in Java but then
 call out to app code written in Clojure?


 Same as with Clojure on the JVM. Google's work to making Dalvik compliant 
 really pays off. 

 Also: https://groups.google.com/forum/?fromgroups#!forum/clojure-android
  

-- 
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: Just wanted to say how much I like ClojurePY

2012-08-16 Thread Curtis Gagliardi
I haven't really investigated clojurescript yet, but I was planning on 
looking at it for small scripts where the startup time of the jvm is a 
problem.  Do you feel that clojurepy fills this need better than 
clojurescript for any reasons other than speed?  Or is it libraries like 
numpy that make it more suitable for crunching numbers than javascript?

On Thursday, August 16, 2012 8:00:50 AM UTC-5, Sean Neilan wrote:

 Hey All,

 ClojurePY is actually quite amazing. It has none of the complexities with 
 libraries and projects like Clojure and is suitable for crunching data 
 (because it's on Python) unlike Node.js/Clojurescript. You can use all the 
 python libraries. You can even import ipdb and step through your code 
 without any modifications to the ClojurePY source tree. Even the REPL is 
 better by default.

 Just try 
 sudo easy_install clojure-py

 Then, type clojurepy at your shell to run it!

 Then, put this crappy script into emailScraper.clj to automagically 
 listen to IMAP emails from Gmail:
 Be sure to download imapidle.py from 
 https://raw.github.com/athoune/imapidle/master/src/imapidle.py and place 
 it in the same directory as emailScraper.clj
 Then do $ clojurepy emailScraper.clj. No leiningen! No compilation! Just 
 run it!

 (ns emailScraper)
 ; adding current directory to path
 (require 'os)
 (require 'sys)
 (require 'time)

 ;(.chdir os /Users/seanneilan/BucketsOfNantucket)

 (.append sys/path (.abspath os/path (.-curdir os/path)))

 ; using imapidle in clojurepy
 ;https://raw.github.com/athoune/imapidle/master/src/imapidle.py


 (require 'imapidle)
 (def m (.IMAP4_SSL (.-imaplib imapidle) imap.gmail.com))
 (def fetcher (.IMAP4_SSL (.-imaplib imapidle) imap.gmail.com))
 (require 'getpass)
 (require 'pyzmail)
 ;(require 'ipdb)

 (def pass Your password here!)

 (.login m your gmail here pass) ; type in your password here
 (.login fetcher your gmail here pass)
 (.select m)


 (defn process-message [message]
   ;(println message)
   (.select fetcher)
   (let [raw-msg (.fetch fetcher (int (first message)) (BODY.PEEK[]))
 msg (.message_from_string pyzmail (- raw-msg
 second
 first
 second))
 from (.get_address msg from)
 to (.get_addresses msg to)
 cc (.get_addresses msg cc)
 bcc (.get_addresses msg bcc)
 subject (.get_subject msg)
 attachments (filter
  #(nil? (.-is_body msg))
  (.-mailparts msg))
 text_body (filter
#(= (.-is_body %) text/plain)
(.-mailparts msg))
 html_body (filter
#(= (.-is_body %) text/html)
(.-mailparts msg))
 body (if (empty? html_body) (first text_body) (first html_body))
 body (.get_payload body)]
 (println body)))


 (dorun (map process-message (.idle m)))

 (comment
 (loop [messages (.idle m)]
   (println (first messages))
   (recur (rest messages


 I'm surprised ClojurePY hasn't received more attention.



-- 
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: Is still idiomatic the ant simulation code?

2012-06-11 Thread Curtis Gagliardi
Here's the video: http://blip.tv/clojure/clojure-concurrency-819147
and you can get the code here (ants.clj):
http://www.lisptoronto.org/past-meetings/2009-05-clojure-ants-demo
or here if you don't want to download it: https://www.refheap.com/paste/3096

On Jun 10, 8:00 am, Alexey Kachayev kacha...@gmail.com wrote:
 Guys, can you please share link where I can find the ants demo code?

 --
 Alexey Kachayev,
 CTO at KitApp, Inc.







 On Friday, June 8, 2012 at 4:44 PM, Stuart Sierra wrote:
  The ants demo is definitely dated. It's not terrible, but the code could 
  use some polishing/simplifying using newer additions to the language.
  -S

  --
  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 
  (mailto: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 
  (mailto: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: Lambda: A lniux distro for clojurists

2012-05-25 Thread Curtis Gagliardi
I'll have to check this out when I get home, it sounds like exactly
what I was looking for.  Thanks.

On May 25, 11:01 am, Tom Maynard tom.w...@gmail.com wrote:
 On Thursday, May 24, 2012 3:11:21 PM UTC-5, banseljaj wrote:
  Looking forward to all input.

 I suggest bundling Dave Ray's VimClojure-Easy
 (http://blog.darevay.com/2011/10/vimclojure-easy/).  It's a fully
 functional, bare-bones Vim + VimClojure, REPL-in-editor setup that's
 completely painless.  Further, the supplied .vimrc is stripped to only the
 entries needed to make it work ... you can merge it with your own, or
 customize it to suit.

 I used it myself to get up  running, and then just merged in my own,
 highly customized .vimrc along with my own pathogen-infected .vim directory.

 Another suggestion might be to have some kind of Internet file-sharing
 (Dropbox, Ubuntu One, ...) so that users can migrate files from their
 home systems to this new one (whether virtualized or in a bootable
 partition).

 Otherwise, it looks interesting and I wish you the best with it.  It won't
 convert me, but I expect there is a large target audience for it.

 Tom.

 regards.









  banseljaj

-- 
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: Practical Clojure

2012-04-13 Thread Curtis Gagliardi
I hadn't heard of practical clojure, but while we're praising books,
I'd like to say that Clojure Programming is excellent.  I've been
reading the early access version, and while I haven't finished it, I'm
almost done with the first half, which covers the core of the
language.  It's been incredibly helpful so far and I'm really looking
forward to the practical stuff that makes up second half of the
book.

On Apr 13, 8:51 am, David Cabana drcab...@gmail.com wrote:
 I have not read it all (yet), but what I have read is outstanding.
 O'Reilly has made the table of contents and first chapter available
 online. If you are at all curious, check it out.  The first chapter
 contains an exceptionally lucid and thorough section on destructuring.

 http://cdn.oreilly.com/oreilly/booksamplers/9781449394707_sampler.pdf

-- 
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: I'm writing a Tempest clone in ClojureScript

2012-04-09 Thread Curtis Gagliardi
This is some cool stuff, I'll have to poke through the code later.
I've never played tempest, so I don't know what's supposed to happen,
but it was interesting to just move towards the focal point and let
the flippers pile up around the edges.

On Mar 22, 7:14 pm, Trevor Bentley mrme...@gmail.com wrote:
 I'm teaching myself Clojure/ClojureScript/HTML5 via an excessively complex
 first project: a clone of the arcade game Tempest.  I thought it might be a
 handy resource to share since I've found surprisingly few ClojureScript
 examples.  More certainly couldn't hurt.

 https://github.com/mrmekon/tempest-cljs

 The game is nowhere close to done, but there's some functional drawing and
 movement code.  Collision detection is about the only thing left before it
 qualifies as a game, albeit a terrible, unfinished one.  It isn't
 currently hosted anywhere, so you'll have to run it yourself, or make do
 with the screenshots.  I have 6 levels, one kind of enemy, and the player
 ship moves and shoots.  Level design is the most interesting part -- I
 wrote some level-generating code, so certain types of levels can be
 generated very easily.

 ClojureScript has been surprisingly solid and easy to work with.  I was
 considering using it for a startup I'm working with, and this project has
 done nothing to dissuade me.

 -Trevor

-- 
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