Re: algebra system & core.logic

2012-05-18 Thread David Nolen
It might also be interesting to pursue a hybrid system - that's the whole point of core.logic - being able to mix functional and relational programming with minimal hassle. David On Fri, May 18, 2012 at 10:39 PM, Brent Millare wrote: > I'm working through "The Art of Prolog" at the moment, we'll

Re: algebra system & core.logic

2012-05-18 Thread Brent Millare
I'm working through "The Art of Prolog" at the moment, we'll see where it takes me. Unknown :) I do know that The Art of Prolog does cover a simple system > based on the Prolog Equation Solving System. You might want to start > research there. > > David > -- You received this message beca

Re: repl hanging sometimes in lein2?

2012-05-18 Thread Nelson Morris
On Fri, May 18, 2012 at 4:16 PM, Jim - FooBar(); wrote: > It seems that the known issue of lein1 (repl hanging sometimes after > printing), is still present on lein2... The only way to avoid this is to aot > compile at least one namespace and then do  "lein2 run", which is exactly > what I used to

1.5.0 alpha1 on the way

2012-05-18 Thread Stuart Halloway
Build box has done its job, not sure how long it takes to become visible through maven central. You can follow along: Code changes https://github.com/clojure/clojure. Issue tracking http://dev.clojure.org/jira/secure/IssueNavigator.jspa?mode=hide&requestId=10002. Dev mailing list https://group

Extending core.logic (Datomic example)

2012-05-18 Thread David Nolen
core.logic has had the facilities to integrate with external data sources for a very long time. However this feature has been poorly documented. Hopefully the following improves the situation a little bit: http://github.com/clojure/core.logic/wiki/Extending-core.logic-(Datomic-example) David --

Re: algebra system & core.logic

2012-05-18 Thread David Nolen
On Fri, May 18, 2012 at 8:31 PM, Brent Millare wrote: > Is there work towards building an algebra system with core.logic? So one > could analyze mathematical expressions: compute symbolic derivatives, > simplify expressions, determine undefined variables, and other forms of > analysis. Not that

algebra system & core.logic

2012-05-18 Thread Brent Millare
Is there work towards building an algebra system with core.logic? So one could analyze mathematical expressions: compute symbolic derivatives, simplify expressions, determine undefined variables, and other forms of analysis. If there isn't, I have a good starting problem that I need help on. L

Re: Let over Lambda

2012-05-18 Thread P Martin
Great! Thanks for your suggestions. I do come from several years of Java programming and have been digging through Clojure in Action and Joy of Clojure. I was looking for a more general/theoretical book that might give me some deeper insight into Lisp so that I could approach future Clojure pro

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

2012-05-18 Thread Lee Hinman
On Friday, May 18, 2012 5:39:48 PM UTC-6, Lee Hinman wrote: > > > On Thursday, May 17, 2012 7:12:35 PM UTC-6, > thenwithexpandedwingshesteershisflight wrote: >> >> it's ok I found the problem: it was due to another dependency, Aleph >> 0.2.1-SNAPSHOT, which depends on Apache HTTP components whi

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

2012-05-18 Thread Lee Hinman
On Thursday, May 17, 2012 7:12:35 PM UTC-6, thenwithexpandedwingshesteershisflight wrote: > > it's ok I found the problem: it was due to another dependency, Aleph > 0.2.1-SNAPSHOT, which depends on Apache HTTP components which are older > versions than those used by ns-browser I have a pull

Re: Replacement function for delete-files-recursively in java-utils

2012-05-18 Thread Raju Bitter
Right, that makes sense. Thanks for the clarification! - Raju -- 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

Re: Replacement function for delete-files-recursively in java-utils

2012-05-18 Thread Phil Hagelberg
On Fri, May 18, 2012 at 3:44 PM, Raju Bitter wrote: > I noticed that the function delete-file-recursively is present in > clojure-contrib java-utils package, but it's missing in > clojure.java.io. Is there any other function for deleting a directory > recursively? > http://richhickey.github.com/cl

Replacement function for delete-files-recursively in java-utils

2012-05-18 Thread Raju Bitter
I noticed that the function delete-file-recursively is present in clojure-contrib java-utils package, but it's missing in clojure.java.io. Is there any other function for deleting a directory recursively? http://richhickey.github.com/clojure-contrib/java-utils-api.html#clojure.contrib.java-utils/de

Re: If Using nth Creates Dependencies, What Is The Best Way To Pull Data Elements From A Sequence

2012-05-18 Thread octopusgrabbus
Pulling the data out of each csv row as a map would eliminate nth. That is a good idea, and I'll add it to my tool bag. On Friday, May 18, 2012 11:37:12 AM UTC-4, Alex Robbins wrote: > > I wonder if the idea was that you are better off using a hash-map and > key lookups so the positions are labe

Re: If Using nth Creates Dependencies, What Is The Best Way To Pull Data Elements From A Sequence

2012-05-18 Thread octopusgrabbus
Thanks for your comment, Tim. You provided a good example and comments on my blog. On Friday, May 18, 2012 4:35:26 PM UTC-4, Tim Visher wrote: > > On Fri, May 18, 2012 at 11:03 AM, octopusgrabbus > wrote: > > In our production development environment, we perform a lot of data > > transfers be

repl hanging sometimes in lein2?

2012-05-18 Thread Jim - FooBar();
It seems that the known issue of lein1 (repl hanging sometimes after printing), is still present on lein2... The only way to avoid this is to aot compile at least one namespace and then do "lein2 run", which is exactly what I used to do before upgrading... Any insights? Is this what everyone

Re: If Using nth Creates Dependencies, What Is The Best Way To Pull Data Elements From A Sequence

2012-05-18 Thread Tim Visher
On Fri, May 18, 2012 at 11:03 AM, octopusgrabbus wrote: > In our production development environment, we perform a lot of data > transfers between diverse systems, and most of those transfers involve > comma-delimited (.csv) data. So my first small Clojure applications have > revolved around the cl

Re: Different behavior at REPL vs compiled code

2012-05-18 Thread Jim - FooBar();
Try wrapping your if statement in a let with a binding : [k (Integer/parseInt n) ] and then use k from then onas Ankit said, arguments passed from cmd are always strings... Jim On 18/05/12 07:39, Ankit Goel wrote: Hi, I have recently started learning clojure and have been setting up lei

Re: ANN: Kibit-mode, a minor mode for Emacs

2012-05-18 Thread Devin Walters
That would be fantastic. I took a stab at updating it awhile back. The maintainer pointed out some more important fixes he wanted to make before taking some of my requests IIRC. So looking back at closed issues might be worth your while. Tangent: Clojure-refactoring as a service would be grea

Re: ANN: Kibit-mode, a minor mode for Emacs

2012-05-18 Thread Vinzent
It'd be interesting to ressurect clojure-refactoring project and merge it with kibit-mode. суббота, 19 мая 2012 г., 0:05:29 UTC+6 пользователь Alex Redinton написал: > > Hello friends, > > Today I decided to hack together a simple learning tool that mashes > Jonas Enlund's sweet kibit tool (htt

ANN: Kibit-mode, a minor mode for Emacs

2012-05-18 Thread Alex Redinton
Hello friends, Today I decided to hack together a simple learning tool that mashes Jonas Enlund's sweet kibit tool (http://github.com/jonase/kibit) with Emacs to ease its use on your Clojure projects. You can find my work at http://github.com/aredington/kibit-mode Right now this is just a reporti

Re: Different behavior at REPL vs compiled code

2012-05-18 Thread Meikel Brandmeyer
Hi, because in the repl you probably call (fact 1) while running the same from the commandline passes a string: (fact "1"). You should get the same error when calling the fact functions with a string at the repl. Kind regards Meikel -- You received this message because you are subscribed to t

Lexer and parser generator in Clojure

2012-05-18 Thread Alexsandro Soares
Hi, I'm trying to build a compiler using Clojure. Is there any tools like flex and bison generating Clojure code? I'm interested in a lexer/parser in pure Clojure because I think in use the same code with Javascript (via ClojureScript) and Java (via Clojure). I already know isolated too

Re: Let over Lambda

2012-05-18 Thread Daniel Jue
It's a good book for diving into fundamentals of Lisp in general, and the cool epiphanies you can have if you are coming from a language like Java... Maybe not the best for a first book on Clojure, or if you are unfamiliar with Lisp/functional programming in general; for that see these comparisons

Re: Let over Lambda

2012-05-18 Thread Joseph Smith
I've read it and highly recommend it. It won't necessarily help you program in Clojure, but it will open your eyes to the seemingly limitless potential of macros. You'll find yourself smiling with intrique just about every page- quite thought-provoking. --- Joseph Smith j...@uwcreations.com (4

Different behavior at REPL vs compiled code

2012-05-18 Thread Ankit Goel
Hi, I have recently started learning clojure and have been setting up leiningen for managing projects. I create a new project using "lein new" and modified the "src/ factorial/core.clj" file to contain the following code (ns factorial.core (:gen-class)) (defn fact [n] (if (= n 1) 1

Re: If Using nth Creates Dependencies, What Is The Best Way To Pull Data Elements From A Sequence

2012-05-18 Thread Alex Robbins
I wonder if the idea was that you are better off using a hash-map and key lookups so the positions are labeled. Some csv libs return a seq of maps where the keys are the column header values. That way you'd be able to select data by name instead of a sometimes arbitrary position. Just a guess. Ale

Re: core.match - variable length match patterns

2012-05-18 Thread David Nolen
Probably out of scope. But this is easy to do w/ core.logic. On Fri, May 18, 2012 at 11:03 AM, David McNeil wrote: > On Friday, May 18, 2012 9:59:40 AM UTC-5, David Nolen wrote: >> >> It sounds like you're describing searching for a pattern? >> > > Yes, I think that sounds right. I am not sure ho

Re: If Using nth Creates Dependencies, What Is The Best Way To Pull Data Elements From A Sequence

2012-05-18 Thread David Nolen
There's nothing wrong with using nth far as I know. On Fri, May 18, 2012 at 11:03 AM, octopusgrabbus wrote: > In our production development environment, we perform a lot of data > transfers between diverse systems, and most of those transfers involve > comma-delimited (.csv) data. So my first sma

If Using nth Creates Dependencies, What Is The Best Way To Pull Data Elements From A Sequence

2012-05-18 Thread octopusgrabbus
In our production development environment, we perform a lot of data transfers between diverse systems, and most of those transfers involve comma-delimited (.csv) data. So my first small Clojure applications have revolved around the clojure-csv library. While learning Clojure I have seen the co

Re: core.match - variable length match patterns

2012-05-18 Thread David McNeil
On Friday, May 18, 2012 9:59:40 AM UTC-5, David Nolen wrote: > > It sounds like you're describing searching for a pattern? > Yes, I think that sounds right. I am not sure how that fits into the core.match picture. Thanks. -David McNeil -- You received this message because you are subscribed to

Re: core.match - variable length match patterns

2012-05-18 Thread David Nolen
It sounds like you're describing searching for a pattern? On Fri, May 18, 2012 at 8:48 AM, David McNeil wrote: > From what I can see core.match does not support matching a variable length > series of values. For example, in a vector, match a series of 0-to-N values > of "1" followed by a value of

Re: Let over Lambda

2012-05-18 Thread Devin Walters
I just started reading LoL. Sometimes I find myself blushing at how the author presents the material, but what I've read so far is pretty good. '(Devin Walters) On Friday, May 18, 2012 at 4:11 AM, nicolas.o...@gmail.com wrote: > LoL is a good book. Very entertaining, even if part of the conte

core.match - variable length match patterns

2012-05-18 Thread David McNeil
>From what I can see core.match does not support matching a variable length series of values. For example, in a vector, match a series of 0-to-N values of "1" followed by a value of "2". I am interested to know whether/how match patterns like this would fit into core.match. Thank you. -David Mc

Re: Avoid duplicate computation in commute?

2012-05-18 Thread nicolas.o...@gmail.com
I think part of the problem is that commute should not return any result. You are not sure this is actually the value that will be returned, this is costly and misleading. There should be at least a variant of commute that return nil. -- You received this message because you are subscribed to th

Re: Let over Lambda

2012-05-18 Thread nicolas.o...@gmail.com
LoL is a good book. Very entertaining, even if part of the content is debatable. (It is a very opiniated book) Reading it after On Lisp could be a good idea, as there are a few references from LoL to On Lisp. http://www.paulgraham.com/onlisp.html The book is definitely a good read, makes you think

Re: Let over Lambda

2012-05-18 Thread Stefan Kamphausen
Hi, it is quite an advanced book, IMHO you should be familiar with macros before readings this. But there is amazing stuff in there. If you are looking for introduction material I suggest reading Peter Seibel's Practical Common Lisp. Peter smoothly introduces macros in one of the first chapt