what tutorials exist for working at the Repl in Emacs?

2016-12-22 Thread larry google groups
I'm curious if there are good tutorials for a modern setup in Emacs. Especially any tutorial that mentions stuff like Pomegranate, that helps at the Repl? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: Are there file watchers that can tell me when a file is done uploading?

2016-12-17 Thread larry google groups
ed. the move should be an atomic operation. > > On 11 Dec 2016 21:47, "larry google groups" <lawrenc...@gmail.com > > wrote: > >> >> I'm in a situation where we allow staff to upload Microsoft Excel files >> to our servers, which we then parse and store

What is the correct way to use 'into'?

2016-12-17 Thread larry google groups
I was trying to combine 2 maps into a new map, as you can see here. I printed both maps to the screen so I could see that, indeed, they were both maps. And yet I got a NullPointerException on the last line here: (defn update-config [more-config] (swap! config-holder (fn

Re: Why would I get this: FileNotFoundException: Could not locate raynes/fs__init.class

2016-12-13 Thread larry google groups
Thank you. That must have been a copy-and-paste error. Funny thing is that I looked at it a half-dozen times and asked myself if I'd copied something wrong. On Tuesday, December 13, 2016 at 12:28:16 PM UTC-5, Toby Crawley wrote: > > On Tue, Dec 13, 2016 at 12:20 PM, larry google

Why would I get this: FileNotFoundException: Could not locate raynes/fs__init.class

2016-12-13 Thread larry google groups
What am I doing wrong here? This is from my project file: :dependencies [ [org.clojure/clojure "1.7.0"] [org.clojure/test.check "0.9.0"] [org.clojure/data.xml "0.1.0-beta1"] [org.clojure/data.json "0.2.6"]

Re: Are there file watchers that can tell me when a file is done uploading?

2016-12-12 Thread larry google groups
ly, you could build a simple web app with a drag and drop file > API. Users open the webpage, drag the Excel files to it, and you can then > control the upload and processing directly, even providing feedback. > > - James > > On 11 December 2016 at 19:47, larry google groups <lawrenc.

Are there file watchers that can tell me when a file is done uploading?

2016-12-11 Thread larry google groups
I'm in a situation where we allow staff to upload Microsoft Excel files to our servers, which we then parse and store the data in DynamoDB. I've only used file watchers once before, to watch for any change in a directory. These seemed to trigger when a file was created in a directory -- I

Re: "lein uberjar" gives me java.lang.OutOfMemoryError:

2016-12-11 Thread larry google groups
Thank you. On Sunday, December 11, 2016 at 6:32:50 AM UTC-5, Matching Socks wrote: > > An answer from "noisesmith" here > > http://stackoverflow.com/questions/32288195/why-lein-uberjar-evaluates-variables-defined-with-def > says, "In order to compile your namespace for the uberjar (if you have

Re: ava.lang.SecurityException: class "org.apache.poi.POIXMLDocumentPart"'s signer information does not match signer information of other classes in the same package

2016-12-11 Thread larry google groups
Thank you. That is a bit frustrating but I guess that is the route I will go On Sunday, December 11, 2016 at 6:26:04 AM UTC-5, Matching Socks wrote: > > Did you find > > http://stackoverflow.com/questions/2877262/java-securityexception-signer-information-does-not-match > and the linked > >

Re: ava.lang.SecurityException: class "org.apache.poi.POIXMLDocumentPart"'s signer information does not match signer information of other classes in the same package

2016-12-10 Thread larry google groups
atools.modelbase.derby "1.0.0.v201107221519"] [org.eclipse.birt.runtime/org.eclipse.datatools.modelbase.sql.query "1.1.4.v201212120619"] [org.eclipse.birt.runtime/org.eclipse.datatools.modelbase.sql "1.0.6.v201208230744"] [org.eclipse.birt.runtime/org.eclip

ava.lang.SecurityException: class "org.apache.poi.POIXMLDocumentPart"'s signer information does not match signer information of other classes in the same package

2016-12-10 Thread larry google groups
I've never worked much with Java, so dealing with stuff like Maven is the stuff I understand least about Clojure. I've added these 3 items to the dependencies that I list in project.clj [org.apache.poi/poi "3.9"] [org.apache.poi/poi-ooxml

Re: "lein uberjar" gives me java.lang.OutOfMemoryError:

2016-12-10 Thread larry google groups
ber 10, 2016 at 11:37:44 PM UTC-5, larry google groups wrote: > > I had a small app that was compelling, and then I added in a java class, > and now when I run "lein uberjar" I get java.lang.OutOfMemoryError. > > I'm working on my MacBook Pro, 16 gigs of memory > > Depe

"lein uberjar" gives me java.lang.OutOfMemoryError:

2016-12-10 Thread larry google groups
I had a small app that was compelling, and then I added in a java class, and now when I run "lein uberjar" I get java.lang.OutOfMemoryError. I'm working on my MacBook Pro, 16 gigs of memory Dependencies were: :dependencies [ [org.clojure/clojure "1.7.0"]

Re: What does "Map literal must contain an even number of forms" mean?

2016-12-05 Thread larry google groups
This: (defn turd [] {:c "Turd" :d "More Turd"}) Would return this map: {:c "Turd" :d "More Turd"} This: (defn config [username password] {:u username :p *password*}) returns a map based on the function arguments. On Monday, December 5, 2016 a

Re: What does "Map literal must contain an even number of forms" mean?

2016-12-05 Thread larry google groups
This is all you need: {:c "Turd" :d "More Turd"} (defn turd [] {:c "Turd" :d "More Turd"}) On Sunday, December 4, 2016 at 4:03:04 PM UTC-5, bill nom nom wrote: > > ;; This works, > (hash-map :a 1 :b 2 ) > > > ;; Here's another way to create a hash map, this won't work because map > ;;

what does (seq) in zipmap do?

2016-11-29 Thread larry google groups
I apologize for this question, because I think it has been asked before, and yet I can not find the answer. In the definition of zipmap, what do these 2 lines do? ks (seq keys) vs (seq vals) In particular, what is (seq) doing? Is this to ensure that ks is false if "keys" is empty? And vs is

Re: How do I call a function in the catch block of try/catch?

2016-11-25 Thread larry google groups
Sorry, I am an idiot. I had added a try/catch to the first "convert" when I was debugging. Ignore all this. On Friday, November 25, 2016 at 6:41:57 PM UTC-5, larry google groups wrote: > > I know some of you will tell me that I shouldn't use try/catch for control > fl

Re: How do I call a function in the catch block of try/catch?

2016-11-25 Thread larry google groups
like my try/catch does not catch this. How is that possible? On Friday, November 25, 2016 at 6:41:57 PM UTC-5, larry google groups wrote: > > I know some of you will tell me that I shouldn't use try/catch for control > flow. That is fine. I might redo this. But for now, I'd like

How do I call a function in the catch block of try/catch?

2016-11-25 Thread larry google groups
I know some of you will tell me that I shouldn't use try/catch for control flow. That is fine. I might redo this. But for now, I'd like to simply know why this doesn't work. I have this function: (defn start [] (let [filenames-as-seq-of-strings (.list (io/file "/home/ec2-user/uploads/"))]

Re: WAT: JavaScript & Ruby

2016-10-13 Thread larry google groups
> Waiting for the Clojure and Scala version. :-} But there won't be. Not ever. Not really. The reason I prefer Clojure over Javascript or Ruby is because so much care and thought went into the APIs of Clojure's core structures and syntax. If you try really hard, you can find the occasional

Re: core.async top use cases

2016-10-13 Thread larry google groups
> It is not just convenience. For example agents don't provide functionality like buffering, back pressure > and select aka alts. If you send an action to an agent you don't get to know when it's done or > to choose what to do if it is currently busy. So when to use agents? I've looked

Re: Keywords with colon on the backside?

2016-10-13 Thread larry google groups
Am I correct in saying that this conversation is at least partly related to the question of "Will Clojure ever support reader macros?" And for now the answer is "no". Because with reader macros, programmers could change the meaning of ":". On Friday, September 23, 2016 at 7:13:30 PM UTC-4,

Re: [ANN] permissions - role & permission based access control

2016-10-12 Thread larry google groups
; schrieb am Di., 11. Okt. 2016 um > 14:04 Uhr: > >> If you wanted to do something more efficient, why not just use a bitmask? >> That is far more efficient than prime factorization. >> >> >> On Tuesday, October 11, 2016 at 12:06:19 AM UTC-4, larry google

Re: [ANN] permissions - role & permission based access control

2016-10-10 Thread larry google groups
A minor pet peeve of mine, but is it possible to attach prime numbers to the roles, and to then decipher the roles from the factors of the total? Using strings or keywords for permissions often strikes me as inefficient. Assuming: create -- 2 read -- 3 update -- 5 delete -- 7 bulk-erase

Re: Clojure needs a web framework with more momentum

2015-05-07 Thread larry google groups
I assume most people here would agree with this: Nothing is merely a pull request; it is someone's valuable time spent in contemplation and action. At the same time, I assume most people who would use Clojure will also know something about Git, and I think this applies even to fairly new

Re: Clojure needs a web framework with more momentum

2015-05-06 Thread larry google groups
Also, most of the time you do not need any complex framework to build a basic webservice with Clojure. True. Also, what is a basic web service? I have a friend who just got done with the 12 week crash-course in Rails that is offered by DevBootcamp in New York City. In 12 weeks he had to

Re: Clojure needs a web framework with more momentum

2015-05-06 Thread larry google groups
Maybe I don't entirely understand what a web framework is, but it seems to me like Immutant is an example of something that might fit into a lot of the buckets. I agree. Perhaps people feel that it lacks the auto-generation of scaffolding for CRUD? Though I imagine that would be easy to

What is a real example of the Observer pattern?

2015-05-06 Thread larry google groups
I am looking here: https://strange-loop-2012-notes.readthedocs.org/en/latest/monday/functional-design-patterns.html I read: Observer Pattern https://strange-loop-2012-notes.readthedocs.org/en/latest/monday/functional-design-patterns.html#observer-pattern - Register an observer with a

Re: Clojure needs a web framework with more momentum

2015-05-06 Thread larry google groups
This is certainly true: Docs are about empathy, which means discussions should show empathy. I am not sure what you mean by That response does not respect people’s limited time. I think you mean that Pull Requests are often a waste of time, because you can not be certain if the Pull Request

What is best practice regarding transducers

2015-05-06 Thread larry google groups
I would like to write a detailed blog post about how developers are actually using transducers. If you have a public project on Github that is using transducers, would you please point me to it? I would like to see what you did. If you are not using transducers, but you plan to in the near

Re: Clojure needs a web framework with more momentum

2015-05-04 Thread larry google groups
Someone earlier in the thread wrote about how Ruby was the abstraction in contrast to PHP where libraries were tied to a framework. I've never worked with Rails seriously, but I find it hard to believe that libraries such as shopping carts intended for Rails will work out of the box with

Re: Clojure needs a web framework with more momentum

2015-05-04 Thread larry google groups
I've taken a couple of long lived Rails apps from Rails 1 to Rails 4 and while there have been breaking changes with each major version change (and some minor versions) in general it's pretty easy to keep up with the latest versions and there are copious docs (even whole ebooks in some

Re: Clojure needs a web framework with more momentum

2015-05-04 Thread larry google groups
My guess is that over the next 2-3 years we will see some clojure frameworks emerge but they will not be like traditional frameworks. Or the space for web framework will always default to Rails. Clojure certainly has some great frameworks in other areas, such as distributed data

Re: Clojure needs a web framework with more momentum

2015-05-04 Thread larry google groups
While I agree that g vim's metrics aren't terribly meaningful, the conclusion he's arriving at is an important one. I think g vim's metrics have some impact with management. Certainly, its worth talking about. A few months ago I was talking to the woman at the New York Times who overseas

Re: Clojure needs a web framework with more momentum

2015-05-04 Thread larry google groups
3, 2015 at 8:25:22 PM UTC+2, larry google groups wrote: The web development industry as reflected in job postings at Indeed.co.uk is still dominated by the likes of Rails, Django, Laravel, Zend, Symfony Spring so I'm not sure how you've concluded that there's been a 15-year trend

Re: Clojure needs a web framework with more momentum

2015-05-04 Thread larry google groups
Very interesting discussion going on here. As a beginner, what I'd like to see is not something like Django or Rails, but something like Flask. Flask started off as a sort of joke -- a few Python programmers, responding to criticism of bloat in Django, said it should be possible to create a

Re: Clojure needs a web framework with more momentum

2015-05-04 Thread larry google groups
I read several comments about how easy it is to upgrade Rails. Either things have been improving at the speed of light or I am a complete idiot. My last upgrades from 2.x to 2.y have been nightmares, dependency hell multiplied by an unknown factor above 100... I strongly agree. I think

Re: Clojure needs a web framework with more momentum

2015-05-03 Thread larry google groups
The industry has been moving against frameworks for 15 years now. The peak of the monolithic framework craze was Struts, back in 2000. After that, people started craving something less bloated. That's why the whole industry was so excited when Rails emerged in 2004. Bruce Eckel summed up the

Re: Clojure needs a web framework with more momentum

2015-05-03 Thread larry google groups
This can be read in a manner opposite to what you intended: There's one factor missing from this discussion which is framework community. I think there's immense value in the community factor which emerges when a web framework gains a lot of mindshare. From what I've read in this thread

Re: Clojure needs a web framework with more momentum

2015-05-03 Thread larry google groups
. On Sunday, May 3, 2015 at 9:51:15 AM UTC-4, g vim wrote: On 03/05/2015 14:39, larry google groups wrote: The industry has been moving against frameworks for 15 years now. The peak of the monolithic framework craze was Struts, back in 2000. After that, people started craving

What are favored Redis-backed queues?

2015-04-24 Thread larry google groups
I'm looking at this old post from Github, that lists the features they were looking for in a message queue: - Persistence - See what's pending - Modify pending jobs in-place - Tags - Priorities - Fast pushing and popping - See what workers are doing - See what workers

What is current best practice regarding exceptions?

2015-04-20 Thread larry google groups
I'm curious, how are people in the Clojure community currently dealing with exceptions? I have a diverse set of questions on this topic. 1.) How many have adopted an Erlang die fast and restart strategy? 2.) How many use something like Supervisor to spin up new JVMs? If not Supervisor, then

Is there a Clojure library for generating checksum patterns

2014-12-29 Thread larry google groups
I've some questions about generating checksum patterns with Clojure. 1.) The simple case. Suppose I arbitrarily decide that in my project the correct answer will be 2, and I want this to be generated by 4 numbers. Is there a Clojure library that would give me: 2 8 4 7 1 1 2 2 4 1 3 4

Re: multimethod, record, type, and protocol pitfalls?

2014-10-27 Thread larry google groups
The differences between OOP and multimethods should be stressed. I just wrote about this on my blog, and those who mostly worked with OOP kept wondering, how do you get inheritance of functionality? Actually, they did not ask this clearly, so it took me awhile to understand their question,

Re: multimethod, record, type, and protocol pitfalls?

2014-10-27 Thread larry google groups
google groups lawrenc...@gmail.com javascript: wrote: ​ The differences between OOP and multimethods should be stressed. I just wrote about this on my blog, and those who mostly worked with OOP kept wondering, how do you get inheritance of functionality? ​ ​First of all, let me state

Re: How do I track down a painfully long pause in a small web app?

2014-09-23 Thread larry google groups
strace show me userland threads (like htop does) or are these child processes? On Monday, September 15, 2014 12:15:14 AM UTC-4, larry google groups wrote: I have an embarrassing problem. I convinced my boss that I could use Clojure to build a RESTful API. I was successful in so far

Re: How do I track down a painfully long pause in a small web app?

2014-09-23 Thread larry google groups
45.497046100943 10483 total On Tuesday, September 23, 2014 9:44:52 PM UTC-4, larry google groups wrote: I am intrigued by this article, as the problem sounds the same as mine: http://corner.squareup.com/2014/09/logging-can-be-tricky.html No significant amount

Re: [ANN] Nginx-Clojure v0.2.5 released!

2014-09-18 Thread larry google groups
JVMs are not goot at huge memory management. Configurable multiple JVM instances (is the same number of Nginx Worker processes) will manage less memory. e.g. we have ten Nginx Worker processes in one Nginx instance every JVM instance will only manage 1/10 memory This is a stupid

Re: Is this a reasonable use of core.async?

2014-09-17 Thread larry google groups
to block and wait until all 4 workers have finished their tasks. On Wednesday, September 17, 2014 3:27:07 AM UTC+10, larry google groups wrote: This does not look correct to me. Perhaps someone else has more insight into this. I am suspicious about 2 things: 1.) your use of doall 2

Re: Is this a reasonable use of core.async?

2014-09-17 Thread larry google groups
+10, larry google groups wrote: This does not look correct to me. Perhaps someone else has more insight into this. I am suspicious about 2 things: 1.) your use of doall 2.) your use of (thread) It looks to me like you are trying to hack together a kind of pipeline or channel

Re: Is this a reasonable use of core.async?

2014-09-17 Thread larry google groups
not needed. Cheers though. On Thursday, September 18, 2014 9:38:47 AM UTC+10, larry google groups wrote: We don't have streams of data here, the long running tasks have side-effects. I would prefer to avoid adding another whole framework just to run a few long running jobs in p//. I guess

Re: Is this a reasonable use of core.async?

2014-09-16 Thread larry google groups
This does not look correct to me. Perhaps someone else has more insight into this. I am suspicious about 2 things: 1.) your use of doall 2.) your use of (thread) It looks to me like you are trying to hack together a kind of pipeline or channel. Clojure has a wealth of libraries that can

Re: How do I track down a painfully long pause in a small web app?

2014-09-15 Thread larry google groups
+5:30, larry google groups wrote: I have an embarrassing problem. I convinced my boss that I could use Clojure to build a RESTful API. I was successful in so far as that went, but now I face the issue that every once in a while, the program pauses, for a painfully long time -- sometimes 30

Re: How do I track down a painfully long pause in a small web app?

2014-09-15 Thread larry google groups
Shantanu On Monday, 15 September 2014 09:45:14 UTC+5:30, larry google groups wrote: I have an embarrassing problem. I convinced my boss that I could use Clojure to build a RESTful API. I was successful in so far as that went, but now I face the issue that every once in a while

Re: How do I track down a painfully long pause in a small web app?

2014-09-15 Thread larry google groups
-options.html Shantanu On Monday, 15 September 2014 09:45:14 UTC+5:30, larry google groups wrote: I have an embarrassing problem. I convinced my boss that I could use Clojure to build a RESTful API. I was successful in so far as that went, but now I face the issue that every once in a while

Re: How do I track down a painfully long pause in a small web app?

2014-09-15 Thread larry google groups
Okay, I will dig into jvisualvm. Thanks. On Monday, September 15, 2014 5:53:34 AM UTC-4, David Powell wrote: Use the jvisualvm tool that comes with the jdk- you should be able to connect to the clojure process. Looking at the memory usage graphs, and if the heap size is banging against

How do I track down a painfully long pause in a small web app?

2014-09-14 Thread larry google groups
I have an embarrassing problem. I convinced my boss that I could use Clojure to build a RESTful API. I was successful in so far as that went, but now I face the issue that every once in a while, the program pauses, for a painfully long time -- sometimes 30 seconds, which causes some requests

Can I compare ::logging from one namespace with ::logging from another?

2014-08-09 Thread larry google groups
Please forgive this stupid question, but I'm still trying to understand exactly what the double :: means. I have read that I can use (derive) to establish a hierarchy and I can imagine how this would be useful for things like throwing errors and catching them and logging, but I've also read

Re: Can I compare ::logging from one namespace with ::logging from another?

2014-08-09 Thread larry google groups
keyword won't e.g. clash with other keywords in a collection, contents of which you don't know. Jozef On Saturday, August 9, 2014 7:46:45 PM UTC+2, larry google groups wrote: Please forgive this stupid question, but I'm still trying to understand exactly what the double :: means. I have

Re: Can I compare ::logging from one namespace with ::logging from another?

2014-08-09 Thread larry google groups
On Saturday, August 9, 2014 9:49:58 PM UTC+2, larry google groups wrote: Thank you for the responses. However, when I look here: http://clojure.org/multimethods I see that it says: You can define hierarchical relationships with (derive child parent). Child and parent can be either symbols

Re: Can I compare ::logging from one namespace with ::logging from another?

2014-08-09 Thread larry google groups
use the alias instead of the fully qualified name in keywords: (ns example.core (require [example.other :as o])) (defmethod o/speak ::o/dog [_] bark) (defmethod o/speak ::o/cat [_] meow) - James On 9 August 2014 20:49, larry google groups lawrenc...@gmail.com

Re: Can I compare ::logging from one namespace with ::logging from another?

2014-08-09 Thread larry google groups
qualified name in keywords: (ns example.core (require [example.other :as o])) (defmethod o/speak ::o/dog [_] bark) (defmethod o/speak ::o/cat [_] meow) - James On 9 August 2014 20:49, larry google groups lawrenc...@gmail.com javascript: wrote: Thank you

how do I clojure.string/replace regex characters? Escaping gives me StringIndexOutOfBoundsException

2014-08-04 Thread larry google groups
I'm working on a website with a frontender who asked to be able to save JSON maps that contain field names such as: $$hashKey : 00C The dollar signs are a violation of MongoDB limits on field names, so i need to convert to something else and then convert back. So I thought I would convert to

Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
I have no background with Java so I tend to suffer pain when dealing with it. I am trying to create a thumbnail for an image, but my code dies on the :post assertion of this function: (defn get-file-as-image [filename] {:pre [(= (type filename) java.lang.String) (fs/exists?

Re: Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
for class java.lang.Class I don't get why ImageIO is java.lang.Class after I imported it. On Thursday, February 27, 2014 3:09:53 PM UTC-5, larry google groups wrote: I have no background with Java so I tend to suffer pain when dealing with it. I am trying to create a thumbnail for an image

Re: Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
Ah, I see what happened. There was a Microsoft Word document in my folder of images. It was causing the problems. I had no error handling for non-images. On Thursday, February 27, 2014 3:52:09 PM UTC-5, Aaron Cohen wrote: On Thu, Feb 27, 2014 at 3:44 PM, larry google groups lawrenc

Re: Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
:09:10 PM UTC-5, larry google groups wrote: Ah, I see what happened. There was a Microsoft Word document in my folder of images. It was causing the problems. I had no error handling for non-images. On Thursday, February 27, 2014 3:52:09 PM UTC-5, Aaron Cohen wrote: On Thu, Feb 27, 2014

Re: Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
to native writeImage at com.sun.imageio.plugins.jpeg.JPEGImageWriter.writeImage(Native Method) which is surprising since the Format string, without the period, should be more correct. On Thursday, February 27, 2014 4:47:31 PM UTC-5, larry google groups wrote: Hmm, I made it a little

Re: Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
)); None of those formatting strings have a period in them. And yet when I remove the period from my extension, I get an error. And even with it, nothing happens and nothing gets written to disk. On Thursday, February 27, 2014 5:04:50 PM UTC-5, larry google groups wrote: I wanted to see what

Re: Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
, February 27, 2014 4:47:31 PM UTC-5, larry google groups wrote: Hmm, I made it a little further. Now I am trying to write a thumbnail to disk. I have copied the code from StackOverflow. I am using this function: (defn make-thumbnail [filename path-to-new-file-including-file-name width

Re: Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
the file you read (before resizing) and make sure that it's actually loaded correctly? On Thu, Feb 27, 2014 at 5:04 PM, larry google groups lawrenc...@gmail.comjavascript: wrote: I wanted to see what Format strings I am allowed, so at the repl: user (import 'javax.imageio.ImageIO

Re: Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
quality options. As for why your code isn't working, it's hard to say. Can you try just writing out the file you read (before resizing) and make sure that it's actually loaded correctly? On Thu, Feb 27, 2014 at 5:04 PM, larry google groups lawrenc...@gmail.comjavascript: wrote: I

Re: NoClassDefFoundError after I import with use on the repl?

2014-02-07 Thread larry google groups
, 2014 at 9:11 PM, larry google groups lawrenc...@gmail.comjavascript: wrote: I imagine this question has been asked a million times before, but I can not find the answer. I was looking at Raynes/fs library: https://github.com/Raynes/fs/blob/master/src/me/raynes/fs.clj I wanted

What is # doing in #+cljs [cljs.reader :as reader]

2014-02-07 Thread larry google groups
I am looking here: https://github.com/jkk/formative/blob/master/src/formative/parse.cljx and I see this line: #+cljs [cljs.reader :as reader] So I look here to see what the # is doing: http://clojure.org/reader and I read: Dispatch (#) The dispatch macro causes the reader to use a reader

NoClassDefFoundError after I import with use on the repl?

2014-02-06 Thread larry google groups
I imagine this question has been asked a million times before, but I can not find the answer. I was looking at Raynes/fs library: https://github.com/Raynes/fs/blob/master/src/me/raynes/fs.clj I wanted to check and see if iterate-dir returned a seq of strings (paths) or a seq of File objects

Why is add-watch still in alpha?

2013-12-29 Thread larry google groups
add-watch was alpha in Clojure 1.2: http://clojuredocs.org/clojure_core/1.2.0/clojure.core/add-watch it is still alpha now, in Clojure 1.5: http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/add-watch I am curious what the plan is for add-watch? I was just reading this:

Re: is there a tutorial about working at the REPL?

2013-12-29 Thread larry google groups
If it can't find the file, `clojure.java.io/resource`http://clojure.java.io/resource returns nil; and (slurp nil) throws an IllegalArgumentException, which doesn't seem to be the error you're getting. Thanks for that. But the app has no problem reading the schema.edn file when I start

is there a tutorial about working at the REPL?

2013-12-28 Thread larry google groups
I have been working with Clojure now some of the time for the last 18 months, so I am no longer a complete noob. But I still have many questions about how to work at the REPL. In particular, I don't understand how the REPL interacts with the class path. I have an app that is working. When I

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread larry google groups
What still scars me in terms of incorporating Clojure as a language of choice in more complicated projects I work on in my other life, is the error reporting facility. The errors sometimes might as well just say 'I just cannot run!'. It would be nice if there was some facility to

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread larry google groups
I like this: (defmacro dump-locals [] `(clojure.pprint/pprint ~(into {} (map (fn [l] [`'~l l]) (reverse (keys env)) Slingshot also allows one to throw+ an object that is full of local information: https://github.com/scgilardi/slingshot And Michael Drogalis's library Dire

Re: How do I fix *warn-on-reflextion* warnings in 3rd party libraries?

2013-12-23 Thread larry google groups
Sean, Thank you much. I do understand that Clojure is not a *statically typed language, *but it seems like it should be possible to deal with these reflexion issues when someone needs to. In my company we had a Scala versus Clojure debate and there was a vocal crowd that felt we should use

Re: When does clojure.lang.PersistentArrayMap become clojure.lang.PersistentHashMap

2013-12-23 Thread larry google groups
to enforce that a map is returned, enforce that the return is a subtype of java.util.Map rather than checking for a specific concrete class of map. On Sun, Dec 22, 2013 at 3:07 PM, larry google groups lawrenc...@gmail.comjavascript: wrote: Hmm, I see. get-distinct was returning an empty

Re: When does clojure.lang.PersistentArrayMap become clojure.lang.PersistentHashMap

2013-12-23 Thread larry google groups
$fetch.invoke(secretary.clj:327) How else do I find what interfaces the return value might be implementing? On Monday, December 23, 2013 10:04:54 PM UTC-5, larry google groups wrote: enforce that the return is a subtype of java.util.Map rather than checking for a specific concrete class

When does clojure.lang.PersistentArrayMap become clojure.lang.PersistentHashMap

2013-12-22 Thread larry google groups
I am surprised that a map literal is clojure.lang.PersistentArrayMap but as soon as I assign it to a var, it becomes clojure.lang.PersistentHashMap. Are there any rules for being able to predict when these conversions occur? user (type {}) clojure.lang.PersistentArrayMap user (type {:what

Re: When does clojure.lang.PersistentArrayMap become clojure.lang.PersistentHashMap

2013-12-22 Thread larry google groups
is that handles the conversion. I don't care if the return type is clojure.lang.PersistentArrayMap or clojure.lang.PersistentHashMap, all I want is it for it be consistently one or the other. On Sunday, December 22, 2013 2:31:45 PM UTC-5, larry google groups wrote: I am surprised

Re: When does clojure.lang.PersistentArrayMap become clojure.lang.PersistentHashMap

2013-12-22 Thread larry google groups
Hmm, I see. get-distinct was returning an empty lazyseq, which apparently made the difference. On Sunday, December 22, 2013 2:56:01 PM UTC-5, larry google groups wrote: Hmm, the different return types seem tied to the 2 different functions being called, but both functions have the same

How do I fix *warn-on-reflextion* warnings in 3rd party libraries?

2013-12-22 Thread larry google groups
I know this has been discussed before but I could not find anything like a canonical answer via Google. I just set to :warn-on-reflection true in my project.clj and now I get the following warnings. How do I fix the warnings that are in 3rd party libraries? How do I add type hints to code

My first attempt at a macro: can not recognize symbol

2013-12-10 Thread larry google groups
I am working on web software where admins will be using HTML forms to update data in a MongoDb database. I decided to use Lamina to off-load the work to the background. There are several operations that need to happen: updates, deletions, etc, and I thought I'd put each on a different channel.

Re: My first attempt at a macro: can not recognize symbol

2013-12-10 Thread larry google groups
-case for macros. You'd probably be better defining a map with keys for :worker, :channel, etc. Either that or a protocol. - James On 10 December 2013 17:42, larry google groups lawrenc...@gmail.comjavascript: wrote: I am working on web software where admins will be using HTML forms

Re: My first attempt at a macro: can not recognize symbol

2013-12-10 Thread larry google groups
Thanks much. Your approach is much better than mine. I was looking for a good excuse to use a macro, but I suppose I will postpone that for another day. On Tuesday, December 10, 2013 2:03:07 PM UTC-5, James Reeves wrote: On 10 December 2013 18:24, larry google groups lawrenc

How does ! order results from async?

2013-09-13 Thread larry google groups
I am stupid and recursion is clearly beyond my intellect. Martin Trojer has a great blog post here which I learned a lot from but I don't understand why the final example works: http://martintrojer.github.io/clojure/2013/07/17/non-tailrecursive-functions-in-coreasync/ He offers this as an

idiot question about macros

2013-06-07 Thread larry google groups
I am very stupid and I am having trouble figuring out how to read this: (defmacro match-func [ body] `(fn [~'x] (match [~'x] ~@body))) ((match-func [q :guard even?] (+ 1 q) [z] (* 7 z)) 33) ;; 231 What? Why 231? The article is here: http://java.dzone.com/articles/my-first-clojure-macro I

is there a naming convention for the directory with java in it?

2013-05-28 Thread larry google groups
I started a project with lein new. I had a jar file I needed to include in this project (a recommended class from a company that has an API that we are using -- it would be pointless for me to re-write their code, so I simply grabbed the class they offered and compiled it as a jar). I ended up

Re: login with friend, but username blank, despite keyword-params middleware in place

2013-04-30 Thread larry google groups
is in the wrong order. It needs to be (- (wrap-keyword-params) (wrap-nested-params) (wrap-params)) This at least gets me a different error, which is good. But how did you know this? Where is this documented? Why does the order matter? On Monday, April 29,

Re: login with friend, but username blank, despite keyword-params middleware in place

2013-04-29 Thread larry google groups
26, 2013 2:16:22 PM UTC-4, larry google groups wrote: I have tried putting (friend/authenticate) at the beginning and end of this block: (def app (- app-routes (wrap-session {:cookie-name timeout-session :cookie-attrs {:max-age 90}}) (wrap-cookies) (wrap-multipart

Re: login with friend, but username blank, despite keyword-params middleware in place

2013-04-29 Thread larry google groups
After the failed login, I am redirected here: http://localhost:30001/login?login_failed=Yusername= and where I pprint the request, I see this in the terminal: :params { nil, login_failed Y, username }, On Monday, April 29, 2013 3:09:09 PM UTC-4, larry google groups wrote: I will re

a tutorial for working at the repl?

2013-04-29 Thread larry google groups
I am no longer a total beginner at Clojure, but I find I still get badly confused by some issues at the repl (namesspaces, classpath, dependencies, etc). Can anyone point me to a good tutorial about working at the repl? -- -- You received this message because you are subscribed to the

why is load-file in nrepl not getting jsoup?

2013-04-27 Thread larry google groups
I am in emacs, in an nrepl session, and I do this: user (load-file /Users/lkrubner/projects/tma2/cacher/src/cacher/core.clj) ClassNotFoundException org.jsoup.Jsoup java.net.URLClassLoader$1.run (URLClassLoader.java:366) Why do I get that error? The file starts like this: (ns

noob question about try/catch

2013-04-26 Thread larry google groups
I wrote a simple app that gets my data out of an old mysql database and puts it into mongodb. I have this function: (defn add-this-record-to-mongo [db record item-type] (println (str (:user db))) (println (str item-type)) (try (let [record (assoc record :item-type item-type)

Re: noob question about try/catch

2013-04-26 Thread larry google groups
for their side effects. I catch the exception and log it. And then the exception kills the app? Why? On Friday, April 26, 2013 11:53:04 AM UTC-4, George Oliver wrote: On Friday, April 26, 2013 8:01:45 AM UTC-7, larry google groups wrote: I thought I had written the try/catch blog so

  1   2   3   4   >