Re: Java API is copyright protected?

2014-05-11 Thread daly
At the risk of getting slightly off-topic here, here's a comment on Hacker News from a well-respected commenter on legal issues - he's a lawyer specialising in startup and technology law and his analysis is uniformly excellent. He argues that while the result may be unpalatable, it's by no

How do I mock request with content-type in Ring?

2014-05-11 Thread Ivan Schuetz
Hi, I'm using e.g.this: (let [response (app (request :post /user-register {:par1 val :par2 val}))] ) This works, but now I have a service that is provided by external library and requires the type of the request to be explicitly set to application/json.

Re: Proposing a new Clojure documentation system (in Clojure)

2014-05-11 Thread Sean Johnson
So it would be nice if people who are knowledgeable about other doc systems could contribute to it. From what I see, that may involve Tim for Emacs, Sean for reStructured, and Daniel for docco, for example? I took the liberty of fleshing out the

Re: [ldnclj] Clojure Java 8 Compact Profiles

2014-05-11 Thread Bruce Durling
Ben, We've done a few hack days on Incanter and ring/compojure in the past and I presume that there is some clojure hacking that goes on at Hack the Tower. I think sorting out the contributors' agreements and hacking on this would be a great idea. cheers, Bruce On Sun, May 11, 2014 at 7:45 AM,

Re: How do I mock request with content-type in Ring?

2014-05-11 Thread John Hume
On Sunday, May 11, 2014 3:18:56 AM UTC-5, Ivan Schuetz wrote: I tried (let [response (app (content-type (request :post /login {:username jane :password test}) application/json))] ) Take a look at the source. Params passed to

What is going wrong in my code?

2014-05-11 Thread Hussein B.
Hi, I'm trying to learn how to make DSL in Clojure and Korma project is a really good place to learn from. I'm trying this very simple stuff (inspired by Korma, not Korma code): (def predicates {'and :and 'or :or 'not :not ' :gt

Re: What is going wrong in my code?

2014-05-11 Thread Rob Day
On 11 May 2014 15:18, Hussein B. hubaghd...@gmail.com wrote: Hi, I'm trying to learn how to make DSL in Clojure and Korma project is a really good place to learn from. I'm trying this very simple stuff (inspired by Korma, not Korma code): [code snipped] But when I'm trying in the REPL:

Re: What is going wrong in my code?

2014-05-11 Thread Rob Day
On 11 May 2014 15:18, Hussein B. hubaghd...@gmail.com wrote: Hi, I'm trying to learn how to make DSL in Clojure and Korma project is a really good place to learn from. I'm trying this very simple stuff (inspired by Korma, not Korma code): [code snipped] But when I'm trying in the REPL:

Clojure and Fortran

2014-05-11 Thread deyan
Hello! I came across this (fairly good imho) article comparing Clojure, Haskell and Julia in terms of their applicability to scientific computing: http://arstechnica.com/science/2014/05/scientific-computings-future-can-any-coding-language-top-a-1950s-behemoth/ One of Julia's selling points seems

Re: Expected inconsistency between set and map w/ ArrayList?

2014-05-11 Thread Mikera
OK. this thread is a bit worrying. If I understand correctly, it means that we've now got inconsistent hash and equals functions. I suspect this hasn't bitten many people yet simply because it is unusual to mix Java and Clojure collections as keys in the same structure, but it seems like a

Re: Java API is copyright protected?

2014-05-11 Thread Andy Fingerhut
Tim, I am assuming you are aware of the non-Java Clojures called ClojureScript and Clojure on .NET. There are multiple other non-Java Clojure versions of varying degrees of completeness and polish. To my knowledge, they explicitly do not try to maintain compatibility at the Java API level --

Re: Expected inconsistency between set and map w/ ArrayList?

2014-05-11 Thread Luc Prefontaine
Euh From the top of my head after a long working day, aren't we comparing apples with cabbages here ? How can you expect a mutable structure to have any stability over time ? They're not values and even worse they are alien to Clojure. To how much contortions should go through to deal with

Re: Expected inconsistency between set and map w/ ArrayList?

2014-05-11 Thread Jozef Wagner
I'm the reporter of the mentioned ticket and I'm no longer inclined into fixing the hash. The real issue seems to lay in the fact that the = equality tries to work with host non-values. Whether the usefulness of such interoperability outweights the correctness of the =/hash is the issue which

Re: Java API is copyright protected?

2014-05-11 Thread u1204
Andy, Yes, I'm aware of those other efforts. ClojureScript is attacking a different platform so it is clear that some things aren't going to work. Specifically for Clojure, is there a clear line between the non-Java language and the compatiblity at the Java API level? A lot of Clojure

Re: Rethinking Literate Programming

2014-05-11 Thread Gary Johnson
Emacs org-mode provides a markdown-like language, which can be organized into a foldable outline (e.g., chapters, sections, subsections, subsubsections). Syntax is provided for headers, ordered/unordered lists, tables, inline images/figures, hyperlinks, footnotes, and (most importantly for LP)

Re: Expected inconsistency between set and map w/ ArrayList?

2014-05-11 Thread Alex Miller
On Sun, May 11, 2014 at 2:06 PM, Mikera mike.r.anderson...@gmail.comwrote: OK. this thread is a bit worrying. If I understand correctly, it means that we've now got inconsistent hash and equals functions. I suspect this hasn't bitten many people yet simply because it is unusual to mix Java

Re: Headless server, no GUI, no idea

2014-05-11 Thread stiffyrabbit jr
I seem to have it working for now. I managed to make a sample program launch a OS X native dialog. I had to first create the xfvb service and chmod its permissions. Then I set the /etc/ennvironment/DISPLAY variable to my server IP address. With Tomcat started, I launched a repl, and opened

Can somebody help trouble-shoot my core.async code?

2014-05-11 Thread gamma235
I am getting my feet wet with core.async and am trying to attach atoms to channels that update automatically and print out to the console as you take and put. This is not for anything serious, just a way to get familiar with the behavior and functionality of the library and practice my Clojure

Re: Java API is copyright protected?

2014-05-11 Thread Daniel Orias
On Saturday, May 10, 2014 11:37:36 PM UTC-7, da...@axiom-developer.org wrote: At the risk of getting slightly off-topic here, here's a comment on Hacker News from a well-respected commenter on legal issues - he's a lawyer specialising in startup and technology law and his analysis is

using atoms as logs for channels in core.async

2014-05-11 Thread gamma235
Hi everyone, I am getting my feet wet with core.async and am trying to attach atoms to channels that update automatically and print out to the console as you take and put. This is not for anything serious, just a way to get familiar with the behavior and functionality of the library and

http://clojure.org/ link to CLR links old git

2014-05-11 Thread JP Bader
Shouldn't the link be updated to https://github.com/clojure/clojure-clr? -- 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

Re: http://clojure.org/ link to CLR links old git

2014-05-11 Thread Alex Miller
Fixed. On Sunday, May 11, 2014 9:50:54 PM UTC-5, JP Bader wrote: Shouldn't the link be updated to https://github.com/clojure/clojure-clr? -- 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

Re: using atoms as logs for channels in core.async

2014-05-11 Thread James Reeves
On 12 May 2014 03:41, gamma235 jesus.diama...@gmail.com wrote: (defn log-name [ch] (symbol (str ch '-log))) ;; Is this efficiently written? (defmacro transparent-chan [ch] (do `(def ~ch (chan)) `(def (log-name ~ch) (atom [])) `(println new transparent channel created!)))

Re: using atoms as logs for channels in core.async

2014-05-11 Thread Dave Della Costa
1) I feel like it is a redundant to define bindings multiple times in my go's let exprs when the params have already been passed in as arguments. Is there a more idiomatic way to do this? I think the fact that you are re-binding in a let should show you that these variables are already in

Re: using atoms as logs for channels in core.async

2014-05-11 Thread Dave Della Costa
I apologize, apparently you can't use go-loop how I did below, = (def my-go-loop (async/go-loop [msg (async/! c)] (println got msg msg from channel 'c))) ...try this instead: (def my-go-loop (async/go-loop [] (let [msg (async/! c)] (println got msg msg from channel 'c Sorry about

shutdown-agents without agents

2014-05-11 Thread James Gatannah
I apologize if this is just useless noise. It's after midnight on Sunday, I need to get to bed, and I know I'll totally forget about this if I don't make the scenario public. This is on clojure 1.5.1. CentOS 6.5 (virtual guest running on a Citrix Xen Server host, probably also running CentOS),