Re: Clojure Code Formatting

2020-12-19 Thread Marcus Lindner
HI, I have installed Cursive on my IntelliJ Community Version. You have two options to reformat the code. One in the menu Code->"Reformat Code" or CTRL + ALT + L. This should reformat your code. Best regards Marcus Am Sa., 19. Dez. 2020 um 15:48 Uhr schrieb waleed sheikh : > Any one have idea

Re: clojure, not the go to for data science

2015-04-06 Thread Marcus Lindner
I recall correctly it hasn't been updated in years, so I wouldn't really bank on it for maintenance or dependability. Of course, its possible it could be resurrected. If I recall what it was I'll share. Chris Sent via phone On Apr 6, 2015 12:40 PM,

Re: clojure, not the go to for data science

2015-04-06 Thread Marcus Lindner
I wonder, has somebody ever tried to write something like a clojure wrapper for WEKA (http://www.cs.waikato.ac.nz/ml/weka/) or added WEKA to a clojure project? I have done this for a classification problem, but it was rather inchoate and only to create some libsvm and naive bayes classifier.

Re: Need help to store a SVM Model

2014-02-24 Thread Marcus Lindner
Thanks, that helps a lot. :) Am 24.02.2014 20:57, schrieb r0man: In my svm-clj library I read and write the LibSVM model in a text format that LibSVM's C library also understands. That's a sparse text file you could also store in Mongo. Use or take a look at: https://github.com/r0man/svm-clj/

Re: is PG's "imperative outside-in" advice any good?

2013-10-15 Thread Marcus Lindner
How looks this? (defn conditional [x condition consequent alternative] (if (condition x) (consequent x) (alternative x (conditional (some-expression) p f g) Am 15.10.2013 19:02, schrieb Sean Corfield: Yeah, I found when I first got started with Clojure I tended to use let for

Re: Wrong documentation of contains?

2013-08-07 Thread Marcus Lindner
Thanks. But the problem is, that this is not mentioned in the documentation of contains? I found so far :(. I had such a problem a long time ago and remember now which type of "collection" can be used with contains?. But after a time I will forget this again and will refer to the documentation. (A

Re: Find maps with embedded functions in a set

2013-07-31 Thread Marcus Lindner
f you don't use eval, you can use other keys instead of the function > source; a suitable keyword name like :add-x might be good, so you'd end up > with {:a 3 :b 5 :c :add-x} in your data structure and a {:add-x #(+ 1 1)} > in a lookup table somewhere. > > > > On W

Re: Find maps with embedded functions in a set

2013-07-31 Thread Marcus Lindner
Ups. [?] Sorry. Have not seen this typo :(. 2013/7/31 Jim > On 31/07/13 11:01, Goldritter wrote: > >> But when I tried to access the value I got an Exception >> =>(c: {:a 3 :h 5 :c '#(+ 1 1)}) >> RuntimeException Invalid token: c: clojure.lang.Util.**runtimeException >> (Util.java:219) >> {:a 3

Re: Clojure Group

2013-07-06 Thread Marcus Lindner
If it uses clojure or is for clojure and with more information about the product I think there speak nothing agianst it, if you post it. It is not so good to register before you can get any information about the product, so more infos are needed. VG Marcus Am 05.07.2013 19:37, schrieb Mic

Re: clojure.set/union bug?

2013-07-01 Thread Marcus Lindner
As it seems clojure.set/union can be used with maps as parameters too. =>(clojure.set/union {:a 1 :b 2 :c 3 :d 4} {:a 1 :b 4 :c 4}) {:a 1, :c 4, :b 4, :d 4} So it is possible to get a union of keys of a map with => (keys (clojure.set/union {:a 1 :b 2 :c 3 :d 4} {:a 1 :b 4 :c 4})) (:a :c :b :d) I

Re: In what OS do you code?

2013-06-14 Thread Marcus Lindner
I for example use Windows 8 and Windows 7. Am 14.06.2013 20:15, schrieb Raoul Duke: Thanks for all the responses, it looks like Linux is the predominant OS in the Clojure community. er, wow. that's a bit of a leap, isn't it? -- -- You received this message because you are subscribed to the

Re: Incanter 1.5.0 has been released!

2013-06-09 Thread Marcus Lindner
t; :url "http://example.com/FIXME"; :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.5.1"] [incanter "1.5.0"]]) On Sun, Jun 9, 2013

Re: Incanter 1.5.0 has been released!

2013-06-09 Thread Marcus Lindner
Thanks for the new release. Will the changes be also available in files which are downloadable on this link (http://incanter.org/downloads/)? I used these files often to create some ad hoc graphics or a method to show others what can be done. Am 09.06.2013 14:16, schrieb Alex Ott: I'm happ

Re: Installing Clojure on Windows 7

2013-01-30 Thread Marcus Lindner
I use eclipse with the counterclockwise plugin. Till now I had no problems with Vista,7 & 8. Am 24.01.2013 18:57 schrieb : > Apparently installing a development environment for Clojure on Windows 7 > is very difficult. What is the best way, that has a chance that it might > work? > > -- > -- > You

Re: Found bug in contains? used with vectors.

2012-09-04 Thread Marcus Lindner
I wanted to use it to select a random element in a collection (set, vector or list) where I can define elements which should not be selected. The function I now use is: (defn select-random [collection & unselect] "(select-random collection & unselect) selects a random element from the specifi

Re: Found bug in contains? used with vectors.

2012-09-04 Thread Marcus Lindner
I think this is not a bad idea. ;) At all, a method/function name should describe what it does. And if 'contains?' only looks for keys, then 'contains-key?' would be a better descriptor for it. Am 03.09.2012 13:29, schrieb Jim - FooBar();: this is probably the single most confusing name in cl

Re: Best practices for named arguments

2012-06-15 Thread Marcus Lindner
I think the best is to use maps. It is rarly a good idea to have too many arguments. Am 15.06.2012 08:51 schrieb "David Jacobs" : > TL;DR: I want to know best practices for designing functions with multiple > optional arguments. > > Okay, so I'm working to build machine learning algorithms in Cloj

Re: When I use Agents for logging I have a different behavior in the REPL as in the program

2012-04-26 Thread Marcus Lindner
I tried it with doseq many times, but the behvior is the same. In the REPL I got a full map of information, but when I use the program the map with the agent logs is empty. Am 22.04.2012 19:51, schrieb Moritz Ulrich: Just a quick guess after a quick glimpse at the code you linked: (map #(se

Re: When I use Agents for logging I have a different behavior in the REPL as in the program

2012-04-22 Thread Marcus Lindner
I had made some changes on the code I posted. Here is the actual usedcode with the logging functions included. (ns evolution.genalg (:use [util.time]) (:use [util.profile])) ;; Implementation of a genetic algorithm based on the code given ;; in the book "Clojure" by Stefan Kamphausen and Tim

Re: Need help to find a bug in a genetic algorithm

2012-04-12 Thread Marcus Lindner
Ahh ok. I had read following text on http://clojure.org/agents "Note that use of Agents starts a pool of non-daemon background threads that will prevent shutdown of the JVM. Use shutdown-agents to terminate these threa

Re: Need help to find a bug in a genetic algorithm

2012-04-11 Thread Marcus Lindner
Sorry. I meant the code I posted at the beginning. Not your code [1] and [2]. Sorry for causing a misunderstanding :(. Am 12.04.2012 01:36, schrieb Lee Spector: On Apr 11, 2012, at 2:27 PM, Marcus Lindner wrote: Another thing about the posted code here. When the alogrithm is stopped, the

Re: Need help to find a bug in a genetic algorithm

2012-04-11 Thread Marcus Lindner
Thanks. I stumbled across these programs too, when I searched for evolution algorithm in clojure ;). Might be, that I can use these at work, if the need arise... Another thing about the posted code here. When the alogrithm is stopped, the start-stop-agent became the state "stopped". Because t

Re: Need help to find a bug in a genetic algorithm

2012-04-06 Thread Marcus Lindner
he 'start-stop-agents' more control over the algorithm? Am Mittwoch, 4. April 2012 schrieb Marcus Lindner < marcus.goldritter.lind...@googlemail.com>: > Thanks for the answer. > > I wondered too why the GA took so long to solve this small problem. > I tried send for the

Re: Congomongo or monger ???

2012-04-06 Thread Marcus Lindner
mething like that) > Is ok this behavior, or is some problem ? > (Do you need more info ???) > Il giorno mercoledì 4 aprile 2012 16:50:52 UTC-5, Michael Klishin ha scritto: >> >> Marcus Lindner: >> >> > But it might be intersting to see the opinions from more experi

Re: Congomongo or monger ???

2012-04-04 Thread Marcus Lindner
I try to use monger. Its syntax is nearer to mongoDB as CongoMongo. But that is only my personal view :(. I have no real experience with CongoMongo and try to learn MongoDB and Clojure with monger. But it might be intersting to see the opinions from more experienced people ;). 2012/4/4 Simone M

Re: Need help to find a bug in a genetic algorithm

2012-04-03 Thread Marcus Lindner
Thanks for the answer. I wondered too why the GA took so long to solve this small problem. I tried send for the grimreaper, but this does not solve the population increase problem. On a test run the population even increses much faster, wehen I used only send. But I must say I liked the idea

Re: Need help to find a bug in a genetic algorithm

2012-04-03 Thread Marcus Lindner
Yep. Your're right. Am 03.04.2012 20:04, schrieb Jim - FooBar();: The intersting on send is, that the agent queues the send actions if you use send. If you use send-off the agent does not stores the action into a queue. Yet the code uses "send" predominantly... On 03/04/1

Re: Need help to find a bug in a genetic algorithm

2012-04-03 Thread Marcus Lindner
t to my Clojure books...perhaps we could post a new question with different title here on the group...I'm sure more experienced people can answer that with not much time spent... Bottom line is that unless i use pmap i run the risk of running out of memory...presumably it's the same for

Re: Need help to find a bug in a genetic algorithm

2012-04-03 Thread Marcus Lindner
ottom line is that unless i use pmap i run the risk of running out of memory...presumably it's the same for you. Jim On 03/04/12 17:16, Marcus Lindner wrote: Maybe the reason is the STM. If I rmember it correctly, then agents and refs are controlled by Clojures STM mechanic. Eventuell

Re: Need help to find a bug in a genetic algorithm

2012-04-03 Thread Marcus Lindner
ed the code at all apart from adding the missing space... On 02/04/12 21:33, Marcus Lindner wrote: I think the reason here is, that the used agents perform the day-of-life function. Another reason is also, that the individual, which is created by the agent, is put again into teh ref populatio

Re: Need help to find a bug in a genetic algorithm

2012-04-02 Thread Marcus Lindner
mplish? I mean what problem is it producing solution for? It never seems to end regardless of number-of-domiciles! I think i got a glimpse of a "ThursdayGNEXT" string but i'm not sure what it means... Jim On 26/03/12 09:47, Marcus Lindner wrote: Thanks for the answer. Ye

Re: Need help to find a bug in a genetic algorithm

2012-04-02 Thread Marcus Lindner
blem is it producing solution for? It never seems to end regardless of number-of-domiciles! I think i got a glimpse of a "ThursdayGNEXT" string but i'm not sure what it means... Jim On 26/03/12 09:47, Marcus Lindner wrote: Thanks for the answer. Yes, the number of domic

Re: Is it possible to get only the time with the function 'time'

2012-03-28 Thread Marcus Lindner
e/core.clj#L3424 On Wed, Mar 28, 2012 at 21:40, Marcus Lindner wrote: Something like this? (tracktime [f] let [start (System/currentTimeMillis) result (f) end (System/currentTimeMillis)] (vector result (- end start))) Am 28.03.2012 21:34, schrieb Moritz Ulr

Re: Is it possible to get only the time with the function 'time'

2012-03-28 Thread Marcus Lindner
Something like this? (tracktime [f] let [start (System/currentTimeMillis) result (f) end (System/currentTimeMillis)] (vector result (- end start))) Am 28.03.2012 21:34, schrieb Moritz Ulrich: You should use java interop for this: (java.lang.System/curren

Re: Need help to find a bug in a genetic algorithm

2012-03-26 Thread Marcus Lindner
Thanks for the answer. Yes, the number of domicles was the problem. When I use one or two domiciles the population remains relativ stable. If I use 3 or more, then the population is increasing. Is it a good idea to add some helpers for the grimreaper if the population grows too fast? Marcus 20