Name suggestions

2010-03-17 Thread mac
After just a little more test and polish I plan on calling clj-native 1.0. But clj-native is a *really* boring name so I want to change it before 1.0 and I don't have very good imagination when it comes to these things. So I need your help. It doesn't have to have anything to do with anything, coul

Re: Name suggestions

2010-03-17 Thread Ramakrishnan Muthukrishnan
On Wed, Mar 17, 2010 at 12:38 PM, mac wrote: > After just a little more test and polish I plan on calling clj-native > 1.0. But clj-native is a *really* boring name so I want to change it > before 1.0 and I don't have very good imagination when it comes to > these things. > So I need your help. >

Re: Name suggestions

2010-03-17 Thread Garth Sheldon-Coulson
I suggest prawn. Garth On Wed, Mar 17, 2010 at 3:08 AM, mac wrote: > After just a little more test and polish I plan on calling clj-native > 1.0. But clj-native is a *really* boring name so I want to change it > before 1.0 and I don't have very good imagination when it comes to > these things. >

Re: bounded memoize

2010-03-17 Thread Meikel Brandmeyer
Hi, On Mar 16, 8:13 am, Meikel Brandmeyer wrote: > as threatened previously I wrote a summery blog post of this > discussion: http://kotka.de/blog/2010/03/memoize_done_right.html. > Please let me know in case I missed something crucial. And updated with a protocol/type version for bleeding edge

Re: Name suggestions

2010-03-17 Thread Adrian Cuthbertson
You asked for it! What's the bet there are at least 50 responses to your post. How about; natty, nattle, clonat, or just nat. -Rgds, Adrian. On Wed, Mar 17, 2010 at 9:08 AM, mac wrote: > After just a little more test and polish I plan on calling clj-native > 1.0. But clj-native is a *really* bor

Re: Name suggestions

2010-03-17 Thread Meikel Brandmeyer
aborigine -- 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 emai

Re: Name suggestions

2010-03-17 Thread Laurent PETIT
pistil 2010/3/17 Meikel Brandmeyer : > aborigine > > -- > 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 > f

Re: Why do functions in the state monad only accept one value?

2010-03-17 Thread Jarkko Oranen
On Mar 17, 1:17 am, "Steven E. Harris" wrote: > Michał Marczyk writes: > > a State-using programme builds up a stateful computation first, then > > uses runState (or perhaps execState / evalState) to run it as a whole; > > only at this final step does the initial state actually get poured > > i

Re: bounded memoize

2010-03-17 Thread Meikel Brandmeyer
Pfff... ttl strategy still broken... -- 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

Quines

2010-03-17 Thread Kei Suzuki
((fn[](let[s "](print\"((fn[](let[s\"(pr-str s)s" ](print"((fn[] (let[s"(pr-str s)s (let[s "](print\"(let[s\"(pr-str s)s))" ](print"(let[s"(pr-str s)s)) (def s"(def s%s)(printf s(pr-str s))")(printf s(pr-str s)) Any others? -- You received this message because you are subscribed to the

Re: take-to-first & partition-when

2010-03-17 Thread Sean Devlin
Hey Greg, welcome to Clojure :) You might want to take a look at c.c.seq-utils and the clojure cheat sheet. Both of these already exist. See take-while & partition-by The cheat sheet can be found here: http://clojure.org/cheatsheet On Mar 16, 11:12 pm, Greg Fodor wrote: > Just saw that I ne

position/index-of function

2010-03-17 Thread John R. Williams
I'm looking for a function along the lines of java.util.List.indexOf, and I'm having a hard time believing it's not there in the core or at least contrib. I was expecting to find something like this: (defn index-of [coll item] (let [index (.indexOf (sequence coll) item)] (if (neg? index) ni

Re: position/index-of function

2010-03-17 Thread Sean Devlin
You want the positions fn in c.c.seq Sean On Mar 17, 10:43 am, "John R. Williams" wrote: > I'm looking for a function along the lines of java.util.List.indexOf, > and I'm having a hard time believing it's not there in the core or at > least contrib.  I was expecting to find something like this:

web starting clojure apps without Java code

2010-03-17 Thread Eugen Dück
All, Developing in clojure is a lot of fun, at least it was for me and a project of mine - except for one thing: Deploying the app as Java Web Start app, that took me a bit of time to figure out, and not only because Java Web Start is broken in debian squeeze (for a workaround, see bugs.debian.org

Re: Name suggestions

2010-03-17 Thread David Nolen
yodel On Wed, Mar 17, 2010 at 3:08 AM, mac wrote: > After just a little more test and polish I plan on calling clj-native > 1.0. But clj-native is a *really* boring name so I want to change it > before 1.0 and I don't have very good imagination when it comes to > these things. > So I need your h

help with infinite loop: break and examine stack? dynamic tracing? circular lists?

2010-03-17 Thread Lee Spector
I apologize for the length of this message, but I've run into a problem that I think I might approach in any of several ways, each of which leads to questions about things that I'd like to know more about in any event. Some are dev environment questions and some (re: circular lists near the end

Re: take-to-first & partition-when

2010-03-17 Thread Greg Fodor
Hey thanks :) These are different than partition-by and take-while. partition-by triggers a new partition when the predicate value *changes*, whereas partition-when triggers a new partition at any point in the sequence where the predicate is true. take-while takes all the items up to the point in

Re: help with infinite loop: break and examine stack? dynamic tracing? circular lists?

2010-03-17 Thread Richard Newman
An alternative: Is there a way to watch my running Clojure program without breaking it, that is to observe the recent call history (of my own definitions, either all of them or specifically marked ones) from outside the process? If you send a SIGQUIT to the java process, it will print the t

Re: Web Programming with clojure

2010-03-17 Thread invis
http://vimeo.com/8356990 -- 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 g

Broken JSON API in clojure-contrib?

2010-03-17 Thread frye
I'm getting an error, trying to use the JSON API in the clojure- contrib library: user=> (ns foo (:require clojure.contrib.json)) java.lang.Exception: Unable to resolve symbol: defprotocol in this context (json.clj:167) I tried clojure-contrib 1.1.0 with clojure 1.0.0 and 1.1.0. As of today (M

Re: take-to-first & partition-when

2010-03-17 Thread Per Vognsen
That implementation of partitions feels really low level. If you implement the monadic version of partition-when (which I call partition-where in my own code), it looks as simple as this: (defn partitions [xs] (run-seq (m-partition-where (const [false true]) xs))) -Per On Wed, Mar 17, 2010 at

Re: leiningen and random jars

2010-03-17 Thread johnprince
You don't need a pom file - just append -DgeneratePom=true to mvn install:install-file and maven will generate one for you. John On Mar 16, 9:34 pm, Phil Hagelberg wrote: > On Tue, Mar 16, 2010 at 9:22 AM, stevel wrote: > > I'd really like to use leiningen to assemble my classpath for me, but >

Re: help with infinite loop: break and examine stack? dynamic tracing? circular lists?

2010-03-17 Thread Terje Norderhaug
On Mar 17, 2010, at 8:14 AM, Lee Spector wrote: The root problem is that I think I have an infinite loop somewhere in my code and I'm having a hard time tracking it down. [...] In Common Lisp I would wait until I think I'm in trouble, break execution with a keyboard interrupt, look at the fu

Simple functional programming lexicon?

2010-03-17 Thread Ben Armstrong
I am new to clojure and functional programming, but not to programming in general, having been in the profession for a quarter of a century. I'm trying to stretch myself a bit by learning clojure, but some of the threads here go beyond mere stretching to verge on head-exploding. In my offline

Re: help with infinite loop: break and examine stack? dynamic tracing? circular lists?

2010-03-17 Thread Lee Spector
Thanks Richard. The SIGQUIT thing sounds potentially useful, but when I send a SIGQUIT to the stuck (looping) java process it has no effect. I've tried sending SIGQUIT via the Max OS X Activity Monitor and also kill -3, kill -s SIGQUIT, and kill -SIGQUIT with the process ID from a terminal win

Re: help with infinite loop: break and examine stack? dynamic tracing? circular lists?

2010-03-17 Thread Lee Spector
Thanks Terje. I think I must be missing something because both your profiling and "waiting until you are in the situation then use trace on candidate culprits" ideas sound great IF I could do ANYTHING when I'm in the problematic situation. But I can't. My REPL is frozen and unresponsive to anyt

Re: help with infinite loop: break and examine stack? dynamic tracing? circular lists?

2010-03-17 Thread Richard Newman
It'd still be even nicer to be able to get some info without quitting, but this is definitely an improvement! The JVM shouldn't quit when it gets a SIGQUIT. That's just the signal name. You might find this useful: http://www.unixville.com/~moazam/stories/2004/05/18/debuggingHangsInTheJvm.h

Re: Simple functional programming lexicon?

2010-03-17 Thread Sean Devlin
Here's a collection of reading material: http://news.ycombinator.com/item?id=1033503 Personally, I'd recommend Programming Clojure as a good place to start. Sean On Mar 17, 8:28 am, Ben Armstrong wrote: > I am new to clojure and functional programming, but not to programming > in general, havi

Re: position/index-of function

2010-03-17 Thread Christophe Grand
On Wed, Mar 17, 2010 at 3:43 PM, John R. Williams wrote: > I'm looking for a function along the lines of java.util.List.indexOf, > and I'm having a hard time believing it's not there in the core or at > least contrib. I was expecting to find something like this: > > (defn index-of [coll item] >

Re: Broken JSON API in clojure-contrib?

2010-03-17 Thread Michael Wood
On 16 March 2010 22:26, frye wrote: > I'm getting an error, trying to use the JSON API in the clojure- > contrib library: > > user=> (ns foo >  (:require clojure.contrib.json)) > java.lang.Exception: Unable to resolve symbol: defprotocol in this > context (json.clj:167) defprotocol is a Clojure v

Re: help with infinite loop: break and examine stack? dynamic tracing? circular lists?

2010-03-17 Thread Lee Spector
Thanks again -- that is definitely a useful page at unixville. BTW from the dump I got from your previous suggestion I think that my original bug wasn't a loop after all, but was instead caused by exponentially growing BigIntegers. We'll see, but at least I have a better way to investigate thin

Re: Broken JSON API in clojure-contrib?

2010-03-17 Thread Michael Wood
On 17 March 2010 21:18, Michael Wood wrote: [...] > $ java -cp clojure-1.1.0.jar:clojure-contrib.jar clojure.mainClojure 1.1.0 [...] Whoops! Not sure what happened there. That's of course supposed to be: $ java -cp clojure-1.1.0.jar:clojure-contrib.jar clojure.main Clojure 1.1.0 but I'm sure

Re: Simple functional programming lexicon?

2010-03-17 Thread David Nolen
On Wed, Mar 17, 2010 at 8:28 AM, Ben Armstrong wrote: > What I would like to have is some sort of lexicon to at least help explain > the terminology in a way that doesn't require three years of academic > exposure to functional programming to read. Is there such a reference? Or > should I just

Re: Simple functional programming lexicon?

2010-03-17 Thread James Reeves
On 17 March 2010 19:54, David Nolen wrote: > But seriously, in my personal opinion Monads are relatively useless in the > context of Clojure. I'm considering using the continuation monad to implement a parser that can pick up where it left off. However, I agree that they're very rarely used in Cl

Re: Simple functional programming lexicon?

2010-03-17 Thread Konrad Hinsen
On 17 Mar 2010, at 20:54, David Nolen wrote: But seriously, in my personal opinion Monads are relatively useless in the context of Clojure. I'd say that in any impure functional language, monads are useful in the context of specific applications or algorithmic approaches. When working wit

Re: Simple functional programming lexicon?

2010-03-17 Thread David Nolen
On Wed, Mar 17, 2010 at 4:09 PM, Konrad Hinsen wrote: > On 17 Mar 2010, at 20:54, David Nolen wrote: > > But seriously, in my personal opinion Monads are relatively useless in the >> context of Clojure. >> > > I'd say that in any impure functional language, monads are useful in the > context of s

Re: Simple functional programming lexicon?

2010-03-17 Thread eyeris
On Mar 17, 7:28 am, Ben Armstrong wrote: > Or should I just ignore threads like "Why do functions in the state monad > only accept one value?" Yes, ignore those for now. Write an entire program in Clojure before you read anything about monads. They aren't required. When I first dipped my toes in

Re: help with infinite loop: break and examine stack? dynamic tracing? circular lists?

2010-03-17 Thread Michael Wood
On 17 March 2010 20:40, Lee Spector wrote: > > Thanks Richard. > > The SIGQUIT thing sounds potentially useful, but when I send a SIGQUIT to the > stuck (looping) java process it has no effect. I've tried sending SIGQUIT via > the Max OS X Activity Monitor and also kill -3, kill -s SIGQUIT, and

Re: take-to-first & partition-when

2010-03-17 Thread Garth Sheldon-Coulson
Hi Greg, Welcome to Clojure! I haven't scrutinized your code, but at a glance it looks like your implementations are very idiomatic. It also seems right to me that these functions can't be implemented directly in terms of take-while and partition-by. Without more thought I can't say if there are

Re: Simple functional programming lexicon?

2010-03-17 Thread Ben Armstrong
On 17/03/10 03:58 PM, Sean Devlin wrote: Here's a collection of reading material: http://news.ycombinator.com/item?id=1033503 Personally, I'd recommend Programming Clojure as a good place to start. Thanks. Yes, I have already started with "Programming Clojure". It is because it doesn't

Re: Simple functional programming lexicon?

2010-03-17 Thread jonathan.watmo...@gmail.com
On Mar 17, 7:28 am, Ben Armstrong wrote: > I am new to clojure and functional programming, but not to programming > in general, having been in the profession for a quarter of a century.   > I'm trying to stretch myself a bit by learning clojure, but some of the > threads here go beyond mere stretc

Re: Simple functional programming lexicon?

2010-03-17 Thread Ben Armstrong
On 17/03/10 04:54 PM, David Nolen wrote: To me the beauty of Clojure isn't that you _don't_ need a strong academic background or even much exposure to FP to approach the language. Clojure is relatively free of FP jargon, instead we have "Rich Hickey Jargon". I jest :) Very good. And so far,

Re: Simple functional programming lexicon?

2010-03-17 Thread Ben Armstrong
On 17/03/10 05:57 PM, eyeris wrote: On Mar 17, 7:28 am, Ben Armstrong wrote: Or should I just ignore threads like "Why do functions in the state monad only accept one value?" Yes, ignore those for now. Write an entire program in Clojure before you read anything about monads. They ar

Re: Name suggestions

2010-03-17 Thread pthatcher
I can't believe no one has suggested: Najure. On Mar 17, 8:00 am, David Nolen wrote: > yodel > > > > On Wed, Mar 17, 2010 at 3:08 AM, mac wrote: > > After just a little more test and polish I plan on calling clj-native > > 1.0. But clj-native is a *really* boring name so I want to change it >

Re: clj-native 0.8.1

2010-03-17 Thread pthatcher
I can't believe no one has suggested: Najure. On Mar 13, 11:14 am, mac wrote: > Hello all. > I have had some time lately to work on my C FFI for Clojure and I > think it's pretty much feature complete now. > It has support for functions, callbacks, structures, unions and > globals. > For structu

Re: Name suggestions

2010-03-17 Thread Wilson MacGyver
hashi, means bridge in japanese On Wed, Mar 17, 2010 at 3:08 AM, mac wrote: > After just a little more test and polish I plan on calling clj-native > 1.0. But clj-native is a *really* boring name so I want to change it > before 1.0 and I don't have very good imagination when it comes to > these t

Re: Simple functional programming lexicon?

2010-03-17 Thread Praki Prakash
I spent a lot of time trying to understand monads in Haskell, which led to reading Category Theory. It's an alluring subject and one can spend a lot time following the concepts and terminology. But, the good news is that, one doesn't need an advanced degree in math to appreciate monads in FP. A rea