Re: Local database recommendation?

2013-05-26 Thread Zack Maril
Use postgres. If it makes sense later on, then try a nosql solution. Until then, postgres will probably do 95% of what you want out of the box. -Zack On Sunday, May 26, 2013 6:20:02 PM UTC-4, Amirouche Boubekki wrote: > > > 1) Is it structured aka. an object can have several fields possibly >>

New Functional Programming Job Opportunities

2013-05-26 Thread Functional Jobs
Here are some functional programming job opportunities that were posted recently: Clojure Programmer at Triggit http://functionaljobs.com/jobs/148-clojure-programmer-at-triggit Cheers, Sean Murphy FunctionalJobs.com -- -- You received this message because you are subscribed to the Goo

Re: Has anyone here played with Wisp?

2013-05-26 Thread Colin Fleming
I think it looks interesting because it seems like maintaining the Clojure semantics is what also gives a lot of the cljs<->js interop problems. It seems like there would be room for a variant of ClojureScript which maintains as much of the semantics as possible without compromising performance or

Re: Some feedback on coding style

2013-05-26 Thread Mark Engelberg
Another possible design choice is to store a domain-testing predicate in the function's metadata. (with-meta (fn [x] ...) {:domain integer?}) (defn is-defined? [f x] (-> f meta :domain x)) -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To pos

Re: Some feedback on coding style

2013-05-26 Thread David Pollak
Thanks! On Sun, May 26, 2013 at 6:27 PM, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > Hi David, > > Clojure can generate auto-syms with a trailing #. > > user=> `(fn [x#] x#) > (clojure.core/fn [x__349__auto__] x__349__auto__) > > Thanks, > Ambrose > > > On Mon, May 27, 2013

Re: Some feedback on coding style

2013-05-26 Thread Ambrose Bonnaire-Sergeant
Hi David, Clojure can generate auto-syms with a trailing #. user=> `(fn [x#] x#) (clojure.core/fn [x__349__auto__] x__349__auto__) Thanks, Ambrose On Mon, May 27, 2013 at 9:08 AM, David Pollak wrote: > Mark and James, > > Thank you for your input. > > There are two reasons why I don't want t

Re: Some feedback on coding style

2013-05-26 Thread David Pollak
Mark and James, Thank you for your input. There are two reasons why I don't want to simply test for nil as the result of running the pattern match: - The right side of the pattern can be side-effecting. For example, if you are servicing a web request, there may be database calls, etc. Therefore,

Re: A chain of function vars

2013-05-26 Thread Simon Katz
http://clojure.org/data_structures defines how the various data structures implement IFn. I would expect either http://clojure.org/vars or http://clojure.org/Evaluation to talk about the chaining of vars, but if either does I'm missing it. On Monday, 27 May 2013 01:04:42 UTC+1, JvJ wrote: > >

Re: A chain of function vars

2013-05-26 Thread JvJ
I suppose that would depend on the specifications for how various objects are cast to functions. For instance, vectors, maps, sets, keywords, etc. have their own specific ways of acting as functions. Do you know where that is specified? On Sunday, 26 May 2013 18:35:55 UTC-4, Simon Katz wrote:

Re: A chain of function vars

2013-05-26 Thread JvJ
Additionally, we can make the chain into a loop. (defn f1 [] 42) (def f2 #'f1) (def f3 #'f2) (def f1 #'f3) (f3) ==> stack overflow On Sunday, 26 May 2013 18:18:57 UTC-4, JvJ wrote: > > Actually, I spoke WAY too soon. > > It looks like it has to do with the way that Var is cast to IFn. > > > http

Re: A chain of function vars

2013-05-26 Thread Simon Katz
Cool; thanks. That's an implementation-level explanation, which is fine as far as it goes. Can anyone point at a specification-level explanation? On Sunday, 26 May 2013 23:18:57 UTC+1, JvJ wrote: > > Actually, I spoke WAY too soon. > > It looks like it has to do with the way that Var is cast to

Re: Local database recommendation?

2013-05-26 Thread Amirouche Boubekki
> 1) Is it structured aka. an object can have several fields possibly >> complex fields like list or hashmaps but also integers ? dates and uuids >> can be emulated with strings and integers >> 2) Do objects have relations ? a lot of relations ? >> 3) is the data schema fixed at compilation or do

Re: A chain of function vars

2013-05-26 Thread JvJ
Actually, I spoke WAY too soon. It looks like it has to do with the way that Var is cast to IFn. https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Var.java Check out lines 391 and 410. When invoked, the result of fn() is invoked. fn() casts deref() (the data contained by the

Re: A chain of function vars

2013-05-26 Thread JvJ
I could be wrong, but I believe that symbols and vars are separate entities. f1 is a symbol which is associated with a var that contains the function. When you evaluate the symbol 'f1, it looks at the association to find the var. It looks like, when you define f2 and f3 to take on those var

A chain of function vars

2013-05-26 Thread Simon Katz
If I define a chain of vars like this... (defn f1 [] 42) (def f2 #'f1) (def f3 #'f2) ...when I call f3 the chain of vars is followed: (f3) ; => 42 Out of curiosity, where is this following-the-chain defined? I looked at http://clojure.org/evaluation which simply says "The result of

Re: Local database recommendation?

2013-05-26 Thread fmjrey
On Sunday, May 26, 2013 9:11:03 PM UTC+2, Cedric Greevey wrote: > > On Sun, May 26, 2013 at 1:56 PM, James Thornton > > > wrote: > >> >> >> On Sunday, May 26, 2013 12:14:22 PM UTC-5, Cedric Greevey wrote: >> >>> On Sun, May 26, 2013 at 11:33 AM, James Thornton >>> wrote: >>> Hi Cedric - >

Re: Local database recommendation?

2013-05-26 Thread Cedric Greevey
On Sun, May 26, 2013 at 2:45 PM, Amirouche Boubekki < amirouche.boube...@gmail.com> wrote: > > > > 2013/5/26 Cedric Greevey > >> I may be developing an application which will need a persistent, >> > > >> ACID >> > > which means at least transactionnal, are you sure you need that ? > depending on

Re: Local database recommendation?

2013-05-26 Thread Cedric Greevey
On Sun, May 26, 2013 at 1:56 PM, James Thornton wrote: > > > On Sunday, May 26, 2013 12:14:22 PM UTC-5, Cedric Greevey wrote: > >> On Sun, May 26, 2013 at 11:33 AM, James Thornton wrote: >> >>> Hi Cedric - >>> >>> Look at Datomic free edition or the Titan graph database using >>> either Berkeley D

Re: Local database recommendation?

2013-05-26 Thread fmjrey
I would definitely check out Datomic. The free edition uses H2 internally to persist to disk, it's not just a memory db. The datalog query language for Datomic is great, and you should definitely give it some thoughts. A good overview video on Datomic which I recommend is listed on their site:

Re: Local database recommendation?

2013-05-26 Thread Amirouche Boubekki
2013/5/26 Amirouche Boubekki > I think Blueprints from the > Tinkerpopstack would be best suited. > If a graph is needed. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send emai

Re: Local database recommendation?

2013-05-26 Thread Amirouche Boubekki
I think Blueprints from the Tinkerpopstack would be best suited. 2013/5/26 James Thornton > > > On Sunday, May 26, 2013 12:14:22 PM UTC-5, Cedric Greevey wrote: > >> On Sun, May 26, 2013 at 11:33 AM, James Thornton wrote: >> >>> Hi Cedric - >>> >>> Look

Re: Local database recommendation?

2013-05-26 Thread Amirouche Boubekki
2013/5/26 Cedric Greevey > I may be developing an application which will need a persistent, > > ACID > which means at least transactionnal, are you sure you need that ? depending on the database, ACID means differents things. Do you need data integrity across «documents», which means that a tr

Re: Local database recommendation?

2013-05-26 Thread Max Penet
H2 sounds like the safe choice. You could also try/evaluate the latest mapdb: https://github.com/jankotek/MapDB#features It very easy to use from clojure but I only used it on trivial stuff however, and it's still considered alpha. On Sunday, May 26, 2013 5:09:51 PM UTC+2, Cedric Greevey wro

Re: Local database recommendation?

2013-05-26 Thread James Thornton
On Sunday, May 26, 2013 12:14:22 PM UTC-5, Cedric Greevey wrote: > > On Sun, May 26, 2013 at 11:33 AM, James Thornton > > > wrote: > >> Hi Cedric - >> >> Look at Datomic free edition or the Titan graph database using >> either Berkeley DB as its backend datastore or Cassandra in single-server

Re: Local database recommendation?

2013-05-26 Thread Patrick Logan
Apache Jena is another good choice for a graph database. It has the choice of an in-memory database, memory-mapped file database (optionally with ACID transactions), or mapped to a relational database. It can also run as a separate database server. There is a procedural java API and the standard

Re: Local database recommendation?

2013-05-26 Thread Cedric Greevey
On Sun, May 26, 2013 at 11:33 AM, James Thornton wrote: > Hi Cedric - > > Look at Datomic free edition or the Titan graph database using > either Berkeley DB as its backend datastore or Cassandra in single-server > mode -- you can run both locally. > > Datomic: http://www.datomic.com/ > Docs: http

Re: Knowledge derivation in core.logic?

2013-05-26 Thread Patrick Logan
OWL has several levels of increasingly expressive but general inferences. Much of the domain could be represented in OWL (classes (i.e. sets), instances (i.e. set membership), relationships with domains and ranges, etc.), but there would still be a need for the domain-specific inferences descri

Re: Local database recommendation?

2013-05-26 Thread James Thornton
Hi Cedric - Look at Datomic free edition or the Titan graph database using either Berkeley DB as its backend datastore or Cassandra in single-server mode -- you can run both locally. Datomic: http://www.datomic.com/ Docs: http://docs.datomic.com/ Clojure Client: http://docs.datomic.com/clojure

Local database recommendation?

2013-05-26 Thread Cedric Greevey
I may be developing an application which will need a persistent, ACID local database (on the same disk as the application, rather than having to be accessed over the network) containing information about potentially 100,000-1,000,000 (or more) objects. Much of that information will be of a quasi-b

Re: Why is using (not (empty? coll)) not idiomatic?

2013-05-26 Thread Cedric Greevey
To that excellent analysis I would add that, if you're going to iterate through a whole collection, it's much more efficient to call seq on it at the outset, and then use (next s) to progress through the seq; (next s) returns nil when there are no more elements, and is semantically equivalent to (s

Re: Why is using (not (empty? coll)) not idiomatic?

2013-05-26 Thread Alex L.
Hello, I just wanted to share the following piece from The Joy of Clojure, *Chapter 3, page 45*, since I found it interesting and it might be valuable to the t

Re: I18n

2013-05-26 Thread Peter Taoussanis
Since this thread seems to come up from time to time, just adding a quick pointer to Tower: https://github.com/ptaoussanis/tower This gives (among other things) a translation tool using standard Clojure maps for content, Markdown support, translation fallbacks, Ring localization middleware, and

Using Clojure with AppEngine's new ThreadManager and Sockets APIs?

2013-05-26 Thread James Thornton
App Engine just became a more interesting Clojure platform now that Google has opened Compute Engine to everyone and has provided a way to use sockets and threads. Has anyone adapted Clojure to work with App Engine's new ThreadManager and Sockets APIs? The experimental sockets API enables you

Re: Any alternatives for these two ugly patterns?

2013-05-26 Thread dmirylenka
Sorry, that's just another suggestion for the first pattern. For the second, I would use: (cond-> obj (some-test obj) some-transformation) On Sunday, May 26, 2013 12:05:49 PM UTC+2, dmirylenka wrote: > > (merge {:attr something} obj) > > -- -- You received this message because you are subscri

Re: Any alternatives for these two ugly patterns?

2013-05-26 Thread dmirylenka
> > (merge {:attr something} obj) -- -- 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 unsubscr

Re: Knowledge derivation in core.logic?

2013-05-26 Thread Phillip Lord
Not a direct answer to your question, but you might want to take a look at: https://github.com/phillord/tawny-owl This tool wraps OWL, which is a standard language for knowledge representation, that maps to a formal logic underneath, which is machine interpretable and reasonable. I don't know

Re: Some feedback on coding style

2013-05-26 Thread James Reeves
In Scala, PartialFunction is a trait, which in Clojure I'd represent using a protocol: (defprotocol Partial (defined-at? [x])) (defn partial-fn [guard f] (reify Partial (defined-at? [x] (guard x)) clojure.lang.IFn (invoke [f x] {:pre [(guard x)]} (f x And then