Re: My first Clojure program (and blog post about it)

2015-08-06 Thread kirby urner
Also, don't forget to explore the test framework versus global defs and print statements. -- Excellent feedback Mark, thank you so much! This is exactly what I was hoping for. I will be simplifying said code accordingly and posting it back. A great way to learn! I do think I might add

Re: My first Clojure program (and blog post about it)

2015-08-06 Thread Mark Engelberg
On Thu, Aug 6, 2015 at 10:39 AM, kirby urner kirby.ur...@gmail.com wrote: (ns test-project.quadrays) (defprotocol Ops (q-add [this other]) (q-sub [this other]) (q-len [this]) (q-neg [this]) (q-norm [this])) (defrecord Quadray [OA OB OC OD] Ops (q-norm [this] (let [[a b c d] [(:OA

Re: My first Clojure program (and blog post about it)

2015-08-06 Thread Mark Engelberg
Right, so if you use protocols, you'd just have one name: add, sub, norm, len, neg and use for both vectors and quadrays, rather than a v-add / q-add, etc. If there are things that apply only to vectors and not quadrays, you could make those their own protocol (or individual functions). And of

[ANN] Release 0.33.0 of Counterclockwise

2015-08-06 Thread Laurent PETIT
Counterclockwise, the Eclipse Clojure development tool. Counterclockwise 0.33.0 has been released. Highlights: - double-click in front of forms select the whole form - double-click inside a symbol selects the whole symbol (does not stop at hyphens) - Outline accepts tagged litterals - Load file

Re: clj-soap (was: Beginner question

2015-08-06 Thread blake watson
We did some soap as well, and found the same thing, except in our case, SOAP was merely a formality. In other words, it seems some people are using only the barest of SOAP features, and wrapping up the meat up in a SOAP envelope. In other words, we were able to just generate a skeleton in Soap-UI

Re: no set-car! in clojure

2015-08-06 Thread Herwig Hochleitner
You could define your own cons type, like Bodil Stokke did for her microkanren https://github.com/bodil/microkanrens/blob/77dbdc34cde580e26765138102cbdabbfad85b9d/mk.clj#L13 If you mark its fields with ^:volatile-mutable, you can call (set! (.-a lst) new-car) on a cons instance. cheers -- You

Re: Clojure, WEB and Enterprise development

2015-08-06 Thread Gary Verhaegen
I'm not sure I understand the problems here, but if you really want to wrap a Java library that generates a web layer, I'd suggest looking at Vaadin rather than GWT. Though as others have said I do not clearly see what kind of problems you have with the current solutions (immutant, om, etc.). On

Re: [ANN] suchwow: a grab-bag library with some twists

2015-08-06 Thread Brian Marick
Colin Fleming wrote: I think that would be great. It would be preferable to have a single repo for docstring improvements so that tools can obtain them without bringing in other things from e.g. such-wow. Note that everything in suchwow is public domain, so the docstrings there can be

Re: [ANN] suchwow: a grab-bag library with some twists

2015-08-06 Thread Reid McKenzie
Awesome. Thanks for doing this Brian. Reid -- 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

Re: ANN: ClojureScript 1.7.28 - Optional Self Hosting

2015-08-06 Thread Matthew Molloy
Hi David, Are macros supported directly within clojurescript then? I'm having some trouble compiling a macro via defmacro. Matt On Saturday, August 1, 2015 at 1:52:23 AM UTC+8, David Nolen wrote: ClojureScript, the Clojure compiler that emits JavaScript source code. README and source

Re: Using a dynamic var for my database connection for implicit connections+transactions

2015-08-06 Thread Eric Normand
Hi Pablo I think the reason you've got so many responses is because most people share the same problem. I do think this is a fruitful area of discussion. There are multiple ways to go about it. Based on your original post, I'll share my two cents: In my experience, mixing an atom and

Re: Can anyone recommend a tutorial or blog post on porting existing Clojure program to ClojureScript?

2015-08-06 Thread Sebastian Bensusan
Hi Simon, Not exactly what you are asking, but a guide to Using cljc might be helpful: https://github.com/clojure/clojurescript/wiki/Using-cljc Hope this helps, Sebastian -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: Reality check: EC2 + Ubuntu + Atom (from GitHub) + Clojure?

2015-08-06 Thread kirby urner
To recap this thread: I started by looking at GitHub's Atom as an IDE for Asynchronous Learning Engine (ALE), a name I'm using for an Open Source project. I'm interested in Clojure + Java + Python as an example flight path through our curriculum space. Turns out Eclipse is a strong candidate

Can anyone recommend a tutorial or blog post on porting existing Clojure program to ClojureScript?

2015-08-06 Thread Simon Brooke
Hi I have an existing Clojure program which is intended for use in classroom situations to teach kids about ecology and computer science. You can see it in action here http://www.journeyman.cc/microworld/ (but please don't use any but the basic map, since several users using bigger maps at

Re: New version of core.async?

2015-08-06 Thread Alex Miller
I don't know about that particular ticket but I expect to spend some time on async in the near future and get a release out. -- 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

Should the Cheat Sheet mention assoc-in for vectors?

2015-08-06 Thread Carl Smotricz
Dunno if this is the correct place and way to suggest a correction: Someone just mentioned to me that (assoc-in) seems to only work for maps, as the Cheat Sheet section on vectors doesn't mention it. I was able to show him otherwise, but maybe this is something the CS should pick up? -- You

no set-car! in clojure

2015-08-06 Thread 杨旸
Hi everyone, I am current trying to implement a scheme interpreter in clojure following the instruction on SICP chap4. Where I encounter a problem with adding/modifying a def var/fn in enviroment. according to chap4 4.1.3 the set-variable-value! function looks like the following in scheme:

Re: Can anyone recommend a tutorial or blog post on porting existing Clojure program to ClojureScript?

2015-08-06 Thread Simon Brooke
Thank you, that's very helpful. On Thursday, 6 August 2015 08:50:01 UTC+1, Pedro Pereira Santos wrote: Hello, I did something similar, but my engine is pure clojure (no IO). https://medium.com/@donbonifacio/running-clojure-code-on-javascript-e1f37071e69e Best regards On Thu, Aug 6, 2015

Re: no set-car! in clojure

2015-08-06 Thread James Reeves
As with all Clojure data structures, lists in Clojure are immutable, so they cannot be modified in place. Also, defs in Clojure are always global to the current namespace, no matter where they are. For this reason, it's generally not a good idea to nest defns. You may want to refer to how other

Re: no set-car! in clojure

2015-08-06 Thread Francis Avila
There is no equivalent to set-car!, because conses are not mutable. Only vars, refs, atoms, and agents are mutable, and they are simply containers for immutable values. You could put a cons inside an atom and put a new transformed list into the atom. (Note even among schemes set-car! is highly

Re: My first Clojure program (and blog post about it)

2015-08-06 Thread kirby urner
On Thursday, July 30, 2015 at 6:38:11 PM UTC-7, kirby urner wrote: On Thu, Jul 30, 2015 at 6:14 PM, Leif wrote: This still seems very verbose to me. I think it is because the definition of open, opposite, and closed are implicit in the great big blocks of arithmetic you are doing. I

Re: Should the Cheat Sheet mention assoc-in for vectors?

2015-08-06 Thread Andy Fingerhut
I have added assoc-in to the Vectors/'Change' section of the cheat sheet that is available here: http://jafingerhut.github.io That is where the latest version is published. The version at clojure.org/cheatsheet gets updated less frequently -- typically a couple of times a year, when there are

Strictly tagged clojure

2015-08-06 Thread Reid McKenzie
Hello all, Alan Malloy and I recently implemented[1] and contributed[2] an opt-in strict tags mode to Alexander Yakushev's Skummet compiler. To summarize the linked blog post and merge request, we created the `clojure.core/*strict-tags*` dynamic var which may either be set by users at the

Re: Using a dynamic var for my database connection for implicit connections+transactions

2015-08-06 Thread J . Pablo Fernández
On 5 August 2015 at 19:33, James Reeves ja...@booleanknot.com wrote: So when you're testing, presumably you use a dynamic binding to override the global connection to the test database? The wrap transaction always overrides the dynamic binding, whether it's in tests or not. -- J. Pablo

Re: Should the Cheat Sheet mention assoc-in for vectors?

2015-08-06 Thread Carl Smotricz
Thank you both, Francis and Andy! :) On Thu, Aug 6, 2015 at 7:54 PM, Andy Fingerhut andy.finger...@gmail.com wrote: I have added assoc-in to the Vectors/'Change' section of the cheat sheet that is available here: http://jafingerhut.github.io That is where the latest version is published.

Re: Can anyone recommend a tutorial or blog post on porting existing Clojure program to ClojureScript?

2015-08-06 Thread Pedro Santos
Hello, I did something similar, but my engine is pure clojure (no IO). https://medium.com/@donbonifacio/running-clojure-code-on-javascript-e1f37071e69e Best regards On Thu, Aug 6, 2015 at 8:01 AM, Simon Brooke still...@googlemail.com wrote: Hi I have an existing Clojure program which is

Re: Should the Cheat Sheet mention assoc-in for vectors?

2015-08-06 Thread Francis Avila
assoc-in works for vectors in the sense that both vectors and maps implement ILookup (get) and IAssoc (assoc). assoc-in can navigate any collection that understands get (including sets!), and add to any collection that understands assoc. However, assoc-in will *always* create *maps* when it

[ANN] clj-xpath 1.4.5 OWASP XXE Vulnerability Fix

2015-08-06 Thread Kyle R. Burton
clj-xpath is a library for working with XML and XPath in Clojure. This release [1] addresses an issue reported by Louis Nyffenegger [2]. This release changes the default features enabled in the XML parser to improve security - see the bug for a link to hte OWASP vulnerability. Best Regards,