Re: Lazily extract lines from large file

2012-08-17 Thread Ben Smith-Mannschott
On Fri, Aug 17, 2012 at 10:53 PM, David Jacobs wrote: > Okay that's great. Thanks, you guys. Was read-lines only holding onto > the head of the line seq because I bound it in the let statement? Yea... I think so... I don't know if that's a case that the compiler's "locals clearing" handles. In an

library naming convention

2012-08-17 Thread John Gabriele
I've noticed a 3rd-party Clojure library naming convention (well, a sometimes-recurring pattern at least) that seems pretty sensible: 1. If a Clojure library wraps or otherwise provides access to a Java lib, the Clojure lib name might likely be prefixed with "clj-". For example, clj-time (where,

Re: genuine help needed to speed up minimax algorithm!

2012-08-17 Thread Lars Nilsson
On Fri, Aug 17, 2012 at 8:47 PM, Jim - FooBar(); wrote: > As i was saying the design is pretty and elegant (and lazy!)...Unfortunately > it is terribly slow! I mean unbelievably slow...4-5 min to reach level 4? > How am I ever going to train by evolutionary means if searching takes so > much time

genuine help needed to speed up minimax algorithm!

2012-08-17 Thread Jim - FooBar();
Hi all, I really need your advice/help with something I was not expecting! let me explain... after spending almost a week experimenting with different designs for my chess minimax algorithm, I settled down on a design that I like. I like it because it is rather functional (as opposed to my Ja

deployment

2012-08-17 Thread George Oliver
hi, I'm a Clojure beginner working on a web project and starting to think about deployment. Currently I host my project in a local VM and have a small VPS for public testing. Looking down the road I'd like a more flexible hosting solution. It seems like the hosting landscape is changing fast

Re: newbie question on namespaces and reference resources

2012-08-17 Thread Hugo Estrada
Thanks for answering both questions. I believe I saw some musical package, so maybe I will look at that code. Thanks so much :) On Fri, Aug 17, 2012 at 7:20 PM, Stephen Compall wrote: > On Sun, 2012-08-12 at 19:55 -0700, Hugo Estrada wrote: > > 1. What is the best practice with namespaces? Should

Re: newbie question on namespaces and reference resources

2012-08-17 Thread Stephen Compall
On Sun, 2012-08-12 at 19:55 -0700, Hugo Estrada wrote: > 1. What is the best practice with namespaces? Should I follow > java-style namespacing names, or does clojure has its own favored > style? Most packages simply have a prefix matching the name of the package, without domain. This isn't unive

Re: Rich added set-agent-send(-off)-executor! and send-via functions

2012-08-17 Thread Herwig Hochleitner
> I can totally understand send-via, but set-agent-send-executor! and > set-agent-send-off-executor! feel dangerous to me like Ruby used to in that > if they're used by libraries that you include, then there's potential for > non-deterministic behaviour - i.e. last-one-wins. > > Can anyone explain

Re: Follow-up questions on Stuart's InfoQ interview

2012-08-17 Thread Ben Mabey
On 8/17/12 3:03 PM, Rich Morin wrote: I took a break from reading "Programming Clojure, 2e" to watch Stuart's InfoQ interview: Stuart Halloway on Datomic, Clojure, Reducers http://www.infoq.com/interviews/halloway-datomic I have a couple

Follow-up questions on Stuart's InfoQ interview

2012-08-17 Thread Rich Morin
I took a break from reading "Programming Clojure, 2e" to watch Stuart's InfoQ interview: Stuart Halloway on Datomic, Clojure, Reducers http://www.infoq.com/interviews/halloway-datomic I have a couple of questions which I hope folks can answe

Re: Rich added set-agent-send(-off)-executor! and send-via functions

2012-08-17 Thread Sam Aaron
On 17 Aug 2012, at 18:35, mnicky wrote: > I have some great news: > https://github.com/clojure/clojure/commit/f5f4faf95051f794c9bfa0315e4457b600c84cef > :) I can totally understand send-via, but set-agent-send-executor! and set-agent-send-off-executor! feel dangerous to me like Ruby used to

Re: Lazily extract lines from large file

2012-08-17 Thread David Jacobs
Okay that's great. Thanks, you guys. Was read-lines only holding onto the head of the line seq because I bound it in the let statement? On Fri, Aug 17, 2012 at 11:09 AM, Ben Smith-Mannschott wrote: > On Thu, Aug 16, 2012 at 11:47 PM, David Jacobs wrote: >> I'm trying to grab 5 lines by their lin

Light Table reaches 0.1.0

2012-08-17 Thread mnicky
Another good news today: http://www.chris-granger.com/2012/08/17/light-table-reaches-010 :) -- 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: Lazily extract lines from large file

2012-08-17 Thread Ben Smith-Mannschott
On Thu, Aug 16, 2012 at 11:47 PM, David Jacobs wrote: > I'm trying to grab 5 lines by their line numbers from a large (> 1GB) file > with Clojure. > > So far I've got: > > (defn multi-nth [values indices] > (map (partial nth values) indices)) > > (defn read-lines [file indices] > (with-open [r

Re: Rich added set-agent-send(-off)-executor! and send-via functions

2012-08-17 Thread Hugo Duncan
mnicky writes: > I have some great news: > https://github.com/clojure/clojure/commit/f5f4faf95051f794c9bfa0315e4457b600c84cef > > :) Good news indeed. Sounds like a good time to plug a little library I wrote to create executors: https://github.com/pallet/pallet-thread Hugo -- You recei

Rich added set-agent-send(-off)-executor! and send-via functions

2012-08-17 Thread mnicky
I have some great news: https://github.com/clojure/clojure/commit/f5f4faf95051f794c9bfa0315e4457b600c84cef :) -- 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 mem

I will be doing Intro to Clojure at StrangeLoop

2012-08-17 Thread Stuart Halloway
Late-breaking add to the StrageLoop preconference workshops: https://thestrangeloop.com/sessions/intro-to-clojure Cheers, Stu Stuart Halloway Clojure/core http://clojure.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, se

Re: [ANN] Leiningen 2.0.0-preview8 released

2012-08-17 Thread Bruce Durling
Phil, On Thu, Aug 16, 2012 at 7:27 PM, Phil Hagelberg wrote: > * Fix memory leak in repl task. Great news. I'm really happy about the OOM fix in REPLy making it in. Thanks! cheers, Bruce -- @otfrom | CTO & co-founder @MastodonC | mastodonc.com -- You received this message because you are su

Re: anonymous fns won't work in seesaw...

2012-08-17 Thread Jim - FooBar();
aaa ok thanks a lot! I was under the impression that #() created a (fn [& args] ...) ! Jim On 17/08/12 11:46, Bronsa wrote: this is because the #() checks for arguments used inside its body to infer its arity. in #(alert "..") you don't use any arg so it creates a function with no argument

Re: clojure keyword and mongodb

2012-08-17 Thread Michael Klishin
Vincent escribió: > > Dear all , > > Can one store clojure keyword in MongoDB and get it back as keyword. ? > How to store Date type using clojure in MongoDB ? > using monger library. > > Monger will convert keyword keys to strings because other languages and clients may or may not have the sa

Re: anonymous fns won't work in seesaw...

2012-08-17 Thread Bronsa
this is because the #() checks for arguments used inside its body to infer its arity. in #(alert "..") you don't use any arg so it creates a function with no argument, such as doing (fn [] ..) Il giorno 17/ago/2012 11.50, "Jim - FooBar();" ha scritto: > Hi everyone, > > I was surprised to discov

ANN Elastisch 1.0.0-RC1

2012-08-17 Thread Michael Klishin
Elastisch is a minimalistic well documented Clojure client for ElasticSearch. Minimalistic here means "not introducing any additional abstractions": Elastisch API closely follows ES API. Elastisch is not a new project and has been in active use since its first weeks. 1.0.0-RC1 is reasonably featu

anonymous fns won't work in seesaw...

2012-08-17 Thread Jim - FooBar();
Hi everyone, I was surprised to discover that anonymous functions will not work in seesaw...For example the following throws an exception (wrong number of args): (button :text "Undo" :listen [:action #(alert "Not implemented!")]) but if i replace the anonymous fn with (fn [e] (alert "Not i