Re: Local variable

2014-07-08 Thread Lars Nilsson
not get executed. Lars Nilsson -- 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

Re: Leiningen/javax.imageio

2014-05-12 Thread Lars Nilsson
/getReaderMIMETypes)] x)) (defn -main [] (println (seq (foo $ lein run (image/jpeg image/png image/x-png image/vnd.wap.wbmp image/gif image/bmp) Worked without problem. Lars Nilsson -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group

Re: instaparse question

2013-10-31 Thread Lars Nilsson
/transform {:WORD (fn [w] (if (...) [:DRUG w] [:WORD w]))} parse-result) so [:DRUG w] is emitted for whatever criteria you may have (lookup) when matched, otherwise [:WORD w] to retain the original content. Lars Nilsson -- -- You received this message because you are subscribed to the Google Groups

Re: futures - The Joy Of Clojure book question

2013-07-23 Thread Lars Nilsson
version, the second case the two Thread/sleep happens in sequence, while in the first they take place in parallel thanks to the futures. Lars Nilsson -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure

Re: Most idiomatic way of splitting a string into sentences?

2013-07-06 Thread Lars Nilsson
is really all you require, (clojure.string/split my-text #[.!?;]) or (re-seq #[^.!?;]+ my-text) For fancier stuff look into an opennlp wrapper or something like it. https://github.com/dakrone/clojure-opennlp Lars Nilsson -- -- You received this message because you are subscribed to the Google

Re: Most idiomatic way of splitting a string into sentences?

2013-07-06 Thread Lars Nilsson
On Sat, Jul 6, 2013 at 5:02 PM, Denis Papathanasiou denis.papathanas...@gmail.com wrote: On Saturday, July 6, 2013 1:22:32 PM UTC-4, Lars Nilsson wrote: [snip] If that kind of splitting is really all you require, (clojure.string/split my-text #[.!?;]) or (re-seq #[^.!?;]+ my-text

Re: with-open and for

2013-06-07 Thread Lars Nilsson
the stream. Lars Nilsson -- -- 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

Re: Wrong number of args (0) passed to: PersistentArrayMap

2013-03-30 Thread Lars Nilsson
)) Assume um/get-from-model is almost the same as get-in. Assume initial-data is stored in the atom um/interactions. Where am I calling a map as a function here? (@um/interactions) perhaps? Lars Nilsson -- -- You received this message because you are subscribed to the Google Groups Clojure group

Re: genuine help needed to speed up minimax algorithm!

2012-08-17 Thread Lars Nilsson
variation, etc. Lars Nilsson -- 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

Re: Lazily extract lines from large file

2012-08-16 Thread Lars Nilsson
, consuming memory for all lines read regardless of whether you are interested in them. Also, nth with sequences is probably not what you want most of the time. Lars Nilsson -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email

Re: How I can convert this python line to clojure?

2012-06-26 Thread Lars Nilsson
for instance) or define your own set of symbols for the values in vtkDataSetAttributes::AttributeTypes, and other enums like it, for more readable code in your own codebase.. Lars Nilsson -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: How I can convert this python line to clojure?

2012-06-25 Thread Lars Nilsson
if you can get the equivalent of 0 as output, but perhaps referring to vtkDataSetAttributes$AttributeTypes/SCALARS will work? Lars Nilsson -- 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

Re: How I can convert this python line to clojure?

2012-06-25 Thread Lars Nilsson
no reference to SCALARS anywhere, including vtkDataSetAttributes.java/class. Lars Nilsson On Mon, Jun 25, 2012 at 12:22 PM, Antonio Recio amdx6...@gmail.com wrote: @Lars Nilsson: I doesn't work. user= (println vtkDataSetAttributes$AttributeTypes/SCALARS) #CompilerException

Re: fully type-hinted record still uses reflection!

2012-06-10 Thread Lars Nilsson
it complains that setLocation cannot be resolved. setLocation is a method in java.awt.Point so i don't see why this happens! Would (.setLocation position) possibly behave differently maybe? Worth a try? Lars Nilsson -- You received this message because you are subscribed to the Google Groups Clojure

Re: fully type-hinted record still uses reflection!

2012-06-10 Thread Lars Nilsson
On Sun, Jun 10, 2012 at 1:08 PM, Lars Nilsson chamael...@gmail.com wrote: On Sun, Jun 10, 2012 at 1:04 PM, Jim - FooBar(); jimpil1...@gmail.com wrote: Hi again (busy day eh?), well this doesn't make any sense either! Why is a record with  type-hinted arguments still using reflection? I've

Re: Doseq, map-style

2012-06-08 Thread Lars Nilsson
. Or perhaps it's insignificant compared to what the unspecified function does that is passed to map for performing the side-effect work.. Lars Nilsson -- 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

Re: Function minimizer a la fminunc

2012-06-08 Thread Lars Nilsson
of building blocks to build upon. Lars Nilsson -- 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

Re: Issues with installing clojure-mode on Mac in Emacs

2012-05-27 Thread Lars Nilsson
-to-list 'load-path (expand-file-name .emacs.d/packages ~)) Lars Nilsson -- 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

Re: Cheap defrecord transformation

2012-04-25 Thread Lars Nilsson
] (let [x {:a 10 :b 20}] (assoc x :c 30 Elapsed time: 2496.002425 msecs nil Timing for a single assigment without looping is bound to have some variance that does not reflect real performance. Regards, Lars Nilsson -- You received this message because you are subscribed to the Google Groups

Re: [ANN] Clojure Namespace Browser (clj-ns-browser 1.0.0)

2012-04-06 Thread Lars Nilsson
display] clnjtqe.cnqe - Na'eroace Ftmda'emsal libqaqx nf she Clnjtqe lamgtage Lars Nilsson -- 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

Re: [ANN] Clojure Namespace Browser (clj-ns-browser 1.0.0)

2012-04-06 Thread Lars Nilsson
Well, as it turns out, I installed Inconsolata just yesterday, along with a couple of others, exploring alternatives to Courier New. Uninstalling Inconsolata results in sdoc displaying the text correctly. Thanks for a very nifty tool. :) Lars Nilsson On Fri, Apr 6, 2012 at 12:29 PM, Frank

Re: Looking for parser generator library

2012-01-28 Thread Lars Nilsson
to bring Parsec-style parsing (to some extent anyway) to Clojure are https://github.com/youngnh/parsatron https://github.com/mmikulicic/clarsec I couldn't say whether they're close enough to what you're looking for or anything though. Lars Nilsson -- You received this message because you

Re: Setting up Emacs to edit Clojure for Windows folks

2012-01-25 Thread Lars Nilsson
frame. Maybe one day I'll look at slime/swank stuff, but I haven't found myself needing much more than this so far. Lars Nilsson -- 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

Re: How to loop over several sequences in parallel for side-effects?

2012-01-20 Thread Lars Nilsson
would expect or not, when you talk about run over several sequences in parallel? Lars Nilsson -- 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

Re: Java interop: inner class

2012-01-09 Thread Lars Nilsson
); } } } and (import 'foo) (import 'foo$bar) (foo$bar. (foo.)) Lars Nilsson -- 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

Re: Faster JSON library

2011-10-10 Thread Lars Nilsson
)] ...) and the time for my 217KB JSON file dropped from 107 seconds to 2 seconds, or only a little more than twice as slow as clj-json (which clocked in a little under one second for my file). Lars Nilsson This reflection warning can be fixed with an enhancement on the Clojure side, which I have just

Re: Faster JSON library

2011-10-10 Thread Lars Nilsson
On Mon, Oct 10, 2011 at 11:19 AM, Lars Nilsson chamael...@gmail.com wrote: On Fri, Oct 7, 2011 at 4:20 PM, Stuart Halloway stuart.hallo...@gmail.com wrote: Trying to be a little bit constructive here, in case I come across as complaining, I took the source for c.d.json and put

Re: Faster JSON library

2011-10-07 Thread Lars Nilsson
than twice as slow as clj-json (which clocked in a little under one second for my file). Lars Nilsson -- 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

Re: Faster JSON library

2011-10-07 Thread Lars Nilsson
I get the following, trying to follow that link. Login Required You are not logged in. You cannot view this URL as a guest. You must log in or sign up for an account . If you think this message is wrong, please consult your administrators about getting the necessary permissions. Lars Nilsson

Faster JSON library

2011-10-06 Thread Lars Nilsson
) to c.d.json that are not available in clj-json, but I'd be hard-pressed to come up with a scenario where I wouldn't pick the significant speed boost of clj-json. Lars Nilsson -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email

Re: Faster JSON library

2011-10-06 Thread Lars Nilsson
in the matter (unless I dig into its code and make changes, rather than work on my own..) I cloned clutch in github with the intent of playing around with swapping in clj-json to see what difference it makes in practice, but it's not what I'd like to work on at the moment, ideally. Lars Nilsson On Thu

Re: standalone indentation tool

2011-08-08 Thread Lars Nilsson
be useful? emacs --batch --eval ... Lars Nilsson -- 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

Re: clooj, a lightweight IDE for clojure

2011-07-19 Thread Lars Nilsson
/file reindent functionality in Emacs. In other words, I usually use TAB for lines that were written earlier, to align it better with new code, not to affect indentation of the line I'm currently typing. Lars Nilsson -- You received this message because you are subscribed to the Google Groups

Re: clooj, a lightweight IDE for clojure

2011-07-18 Thread Lars Nilsson
a directory. It will probably take quite a bit for me to give up Emacs, but I find it a very interesting project, and like several others have said, it worked right out of the box, which is a huge plus. Regards, Lars Nilsson -- You received this message because you are subscribed to the Google

Re: clooj, a lightweight IDE for clojure

2011-07-18 Thread Lars Nilsson
On Mon, Jul 18, 2011 at 1:42 PM, Arthur Edelstein arthuredelst...@gmail.com wrote: Not sure if I'm not misunderstanding the initial creating of a project, but it seems to me that I am using a file dialog box for a directory selection. As it wasn't entirely clear what it expected me to do at

Re: clooj, a lightweight IDE for clojure

2011-07-18 Thread Lars Nilsson
On Mon, Jul 18, 2011 at 2:06 PM, Arthur Edelstein arthuredelst...@gmail.com wrote: Tallied. :) What's your favorite keyboard shortcut for invoking smart indent? Is it TAB? I imagine it's still important to be able to indent and de-indent manually, but maybe I'm wrong. I use TAB. Just about the

Re: [meta] Google Groups/gmail support?

2011-07-18 Thread Lars Nilsson
On Mon, Jul 18, 2011 at 10:21 PM, Ken Wesson kwess...@gmail.com wrote: If you know of such a place, I am all ears. Maybe http://groups.google.com/support/bin/request.py?contact_type=contact_policy ? Lars Nilsson -- You received this message because you are subscribed to the Google Groups

Re: [meta] Google Groups/gmail support?

2011-07-18 Thread Lars Nilsson
=HCutm_medium=leftnavutm_campaign=chrome Lars Nilsson -- 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

Re: Lazy Programming

2010-12-15 Thread Lars Nilsson
On Wed, Dec 15, 2010 at 8:20 AM, Ralph grkunt...@gmail.com wrote: I'm not sure what all the hype is about lazy programming. I've been a lazy programmer for more than 30 years. :-) So this demotivator should fit the bill? http://despair.com/proc24x30pri.html Lars Nilsson -- You received

Re: Make a loop in a loop

2010-07-07 Thread Lars Nilsson
)] (doseq [month (range 1 53 1)] (print-data year range))) Regards, Lars Nilsson -- 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

Re: Batch file wrappers on Windows

2010-06-22 Thread Lars Nilsson
these inconveniences as me, which is fine. At least that means I haven't missed a solution that already exists. Thanks for the feedback, Paul. Maybe Windows Script Host is an option, if you haven't looked at that one yet. Lars Nilsson -- You received this message because you are subscribed to the Google

Re: Batch file wrappers on Windows

2010-06-22 Thread Lars Nilsson
On Tue, Jun 22, 2010 at 10:15 AM, Lars Nilsson chamael...@gmail.com wrote: On Tue, Jun 22, 2010 at 5:08 AM, Paul Moore p.f.mo...@gmail.com wrote: On 22 June 2010 00:11, Rick Moynihan rick.moyni...@gmail.com wrote: On 21 June 2010 18:42, Paul Moore p.f.mo...@gmail.com wrote: 3. Using a bat file

Re: How do I call Foo.class?

2010-04-11 Thread Lars Nilsson
com.google.gdata.client.finance.FinanceService Is seems like (class PortfolioEntry) doesn't resolve to the same type as PortfolioEntry.class. Any ideas? Is getEnrty copy'n'pasted, or just mistyped in the email twice (in code snippet and error message)? Lars Nilsson -- You received this message because you