New Functional Programming Job Opportunities

2014-05-19 Thread Functional Jobs
Here are some functional programming job opportunities that were posted recently: Software Developer (natural language processing, deep semantic search) at SEMPRIA http://functionaljobs.com/jobs/8711-software-developer-natural-language-processing-deep-semantic-search-at-sempria Cheers,

Re: citing Clojure and EDN?

2014-05-19 Thread Phillip Lord
Jony Hudson jonyepsi...@gmail.com writes: On Thursday, 15 May 2014 14:58:50 UTC+1, Phillip Lord wrote: Again, based on the dubious ID that an DOI makes things citable. A URL is already citable! Well, there's no shortage of broken links out there to suggest that people have trouble

Re: [ANN] ring-auth middleware for protecting sessions

2014-05-19 Thread Aaron Bedra
On 05/18/2014 09:25 AM, James Reeves wrote: I don't want to seem like I'm badgering you. You have a lot of sound ideas. But I don't think we should be trying to work around insecure designs; we should be making it easier for people to design things securely. In terms of /specific/ things

Re: [ANN] ring-auth middleware for protecting sessions

2014-05-19 Thread Aaron Bedra
On 05/18/2014 09:25 AM, James Reeves wrote: I don't want to seem like I'm badgering you. You have a lot of sound ideas. But I don't think we should be trying to work around insecure designs; we should be making it easier for people to design things securely. In terms of /specific/ things

Joy of Clojure example not working

2014-05-19 Thread gamma235
Hi guys, I am working through the pre-release second edition of Joy of Clojure's section on multi-methods (section 9.2.~ : pg. 313), and am getting different outputs from what they have printed in the book. I could just skip over it, but I really want to understand this stuff. Could someone

Re: Joy of Clojure example not working

2014-05-19 Thread Rob Day
It looks like it expects the keyword :osx, not the symbol osx. Could that be the issue? On 19 May 2014 16:39, gamma235 jesseluisd...@gmail.com wrote: Hi guys, I am working through the pre-release second edition of Joy of Clojure's section on multi-methods (section 9.2.~ : pg. 313), and am

Re: Joy of Clojure example not working

2014-05-19 Thread gamma235
It looks like it expects the keyword :osx, not the symbol osx. Could that be the issue? Thanks for the suggestion, but when I try that instead, I get this error: java.lang.IllegalArgumentException: No method in multimethod 'compiler' for dispatch value: null I kind of feel it might be

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Bob Hutchison
On May 16, 2014, at 8:49 PM, Julian juliangam...@gmail.com wrote: A quick shoutout to the Clojure Community - thanks for the way you've all contributed to make my life (mentally) richer. James Reeves (author of Compojure and many other wonderful libraries) made this interesting comment

Re: Advice on data structure communication and awareness

2014-05-19 Thread Seth
Hi Mike! You might talk to Zack at CapClug. The session before the one you attended he walked through two small Clojure projects, with and without Prismatic schema. On Saturday, May 17, 2014 2:22:51 PM UTC, Mike Fikes wrote: I've never used a dynamically-typed language and an issue I've

Re: [ANN] ring-auth middleware for protecting sessions

2014-05-19 Thread Brendan Younger
Agreed, let's take this off-list. If anyone else wants in on the discussion, feel free to email myself, James, or Aaron. Brendan On Monday, May 19, 2014 9:07:24 AM UTC-4, abedra wrote: On 05/18/2014 09:25 AM, James Reeves wrote: I don't want to seem like I'm badgering you. You have a

Re: Joy of Clojure example not working

2014-05-19 Thread Greg D
The second edition of Joy of Clojure, MEAP v10 shows the same error and progressive solution about half way down pdf-page 318 in section 9.2.4. On Monday, May 19, 2014 6:39:26 AM UTC-7, gamma235 wrote: Hi guys, I am working through the pre-release second edition of Joy of Clojure's section

Best way to pass parameters?

2014-05-19 Thread Ivan Schuetz
Hi, I'm building a webservice, have 2 layers: webservice and database. Webservice layer receives e.g. a product, to add to the database: {:id 1 :name phone :price 100} Database layer has a method to insert the product, insert-product. I could do 1): (defn insert-product [params]) or 2):

Re: Best way to pass parameters?

2014-05-19 Thread Alex Walker
I'd prefer to combine #1 with a validation layer, similar to prismatic's schema but with a few tweaks. Something* that filtered the param keys based on the allowed columns and ensured the values were sane. Then, hopefully write generic sql helper fns to create the parameterized SET stmt

passing commands to a running server

2014-05-19 Thread Brian Craft
I'm sure I've seen a thread on this, but can't find it now. Is there a common pattern for sending management commands to a running server via cli? E.g. if foo starts my ring server, I need something like foo -x twiddle to send twiddle to the running process. -- You received this message

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Ben Wolfson
I wouldn't say that I *often* find myself reaching for monads, or the state monad in particular, but I certainly have found them useful on occasion (and would have sometimes refrained from using them where I'd naturally lean to doing so solely to avoid creating an dependency). For instance,

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Ben Wolfson
On Mon, May 19, 2014 at 7:48 AM, Bob Hutchison hutch-li...@recursive.cawrote: Haskell's STM transactions can be thought of as a form of IO action (like reading a file is an IO action) that modify refs (there are no atoms in Haskell, only refs). A transaction must be started in the IO monad

Re: Best way to pass parameters?

2014-05-19 Thread Greg D
Not an answer to your question, but you may want to check out: Datomic: The fully transactional, cloud-ready, immutable database.http://www.datomic.com/ On Monday, May 19, 2014 10:07:15 AM UTC-7, Ivan Schuetz wrote: Hi, I'm building a webservice, have 2 layers: webservice and database.

ArithmeticException from unchecked-add

2014-05-19 Thread Greg D
I didn't expect this one. See the illustrative sequence below. Should I be reporting this as a bug, or re-read the docs? ; CIDER 0.5.0 (Clojure 1.6.0, nREPL 0.2.3) user (require '[clojure.stacktrace :as st]) user (unchecked-add (Long/MAX_VALUE) (Long/MAX_VALUE) ) -2 user (unchecked-add

Re: Re-evaluating recuring go blocks

2014-05-19 Thread Dylan Butman
Great! I've used alts! before with control channels which is definitely useful as well. Timothy, can you elaborate a little? I'm still a little unclear when channels are garbage collected. It it an issue to leave channels open after you've stopped using them? I always feel a little strange

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Bob Hutchison
On May 19, 2014, at 1:44 PM, Ben Wolfson wolf...@gmail.com wrote: I wouldn't say that I *often* find myself reaching for monads, or the state monad in particular, but I certainly have found them useful on occasion (and would have sometimes refrained from using them where I'd naturally lean

Re: Re-evaluating recuring go blocks

2014-05-19 Thread Timothy Baldridge
Channels are not tied to anything, so once your code stops referencing them, they are garbage collected. Go blocks are actually nothing more than pretty callbacks that are attached to channels. So if a go is waiting for a put or a take from a channel, it will be GC'd with the channel. I could go

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Bob Hutchison
On May 19, 2014, at 1:50 PM, Ben Wolfson wolf...@gmail.com wrote: On Mon, May 19, 2014 at 7:48 AM, Bob Hutchison hutch-li...@recursive.ca wrote: Haskell's STM transactions can be thought of as a form of IO action (like reading a file is an IO action) that modify refs (there are no atoms

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Ben Wolfson
On Mon, May 19, 2014 at 11:28 AM, Bob Hutchison hutch-li...@recursive.cawrote: On May 19, 2014, at 1:44 PM, Ben Wolfson wolf...@gmail.com wrote: I wouldn't say that I *often* find myself reaching for monads, or the state monad in particular, but I certainly have found them useful on

Re: Re-evaluating recuring go blocks

2014-05-19 Thread Dylan Butman
Yea that's very helpful. When you say the channel can never give them a value, is that because the channel is no longer in scope? So (def c (chan)) (dotimes [x 10] (go (! c))) would not be GC'd until the entire namespace is reevaluated? Would redefining c here cause the 10 GOs to be GC'd?

Re: ArithmeticException from unchecked-add

2014-05-19 Thread Stephen Gilardi
On May 19, 2014, at 2:17 PM, Greg D gregoire.da...@gmail.com wrote: user (unchecked-add ^Long(Long/MAX_VALUE) ^Long(Long/MAX_VALUE) ) ArithmeticException integer overflow clojure.lang.Numbers.throwIntOverflow (Numbers.java:1424) The docs for unchecked-add

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Bob Hutchison
On May 19, 2014, at 2:45 PM, Ben Wolfson wolf...@gmail.com wrote: On Mon, May 19, 2014 at 11:28 AM, Bob Hutchison hutch-li...@recursive.ca wrote: I badly miss the Maybe and Either monads, but would want the syntactic support Haskell provides (which I can't see will ever be available in

Unable to find final method in superclass

2014-05-19 Thread Pradeep Gollakota
Hi All, I’m trying to work with NIO in Java 7, and I’m not able to access methods that are declared in the super class. (.getPath (java.nio.file.FileSystems/getDefault) /) The above code throws the following Exception: Exception in thread main java.lang.IllegalArgumentException: No matching

Re: Joy of Clojure example not working

2014-05-19 Thread gamma235
I actually just wanna know why I need to use derive so many times. Isn't there a core function/macro where I can derive and set hierarchy all at once? I'm just looking for a more efficient way. My bad for not stating that more clearly in the original post. The real problem though is the last

Re: Joy of Clojure example not working

2014-05-19 Thread gamma235
I actually just wanna know why I need to use derive so many times. Isn't there a core function/macro where I can derive and set hierarchy all at once? I'm just looking for a more efficient way. My bad for not stating that more clearly in the original post. The real problem though is the last

Re: Unable to find final method in superclass

2014-05-19 Thread Paul Richardson
Hi Pradeep, The exception you are seeing happens when clojure can't find the correct method; this is often due to an arity mismatch, as is the case here. .getPath expects two arguments: a String followed by a String array. Java makes the variadic parameter seem optional, but in clojure it must

Error using core.async version of into

2014-05-19 Thread Craig
Hi, With the following project file: (defproject p1 0.1.0-SNAPSHOT :description Project One :url http://acme.com; :license {:name Eclipse Public License :url http://www.eclipse.org/legal/epl-v10.html} :dependencies [[org.clojure/clojure 1.6.0] [org.clojure/core.async