Re: Java Metadata Wrapper
I thought of protocols initially here too, but protocols just define functions, so where would the data live that you want as metadata? A closure over the data? This implies extending the protocol on a per-instance basis, which afaik doesn't exist (cljs design work aside http://dev.clojure.org/display/design/specify+i.e.+reify+for+instances). Some global map? We can't key on arbitrary java objects since the hashcode can change. Is there a key that will work? A var? We can already do that. Maybe there's someplace I'm missing where you could store this data and look it up later via a protocol implementation? -- -- 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 unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Java Metadata Wrapper
I think the general solution would be a weak identity map. On Sunday, September 1, 2013 6:58:25 AM UTC-7, Colin Jones wrote: I thought of protocols initially here too, but protocols just define functions, so where would the data live that you want as metadata? A closure over the data? This implies extending the protocol on a per-instance basis, which afaik doesn't exist (cljs design work aside http://dev.clojure.org/display/design/specify+i.e.+reify+for+instances). Some global map? We can't key on arbitrary java objects since the hashcode can change. Is there a key that will work? A var? We can already do that. Maybe there's someplace I'm missing where you could store this data and look it up later via a protocol implementation? -- -- 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 unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Incanter 1.5.4 has been released
Hi all The new bugfix release of Incanter was released as version 1.5.4. See changelog (https://github.com/liebke/incanter/blob/master/Changes.md) for details. Thank you for all who submitted pull requests issues! -- With best wishes,Alex Ott http://alexott.net/ Twitter: alexott_en (English), alexott (Russian) Skype: alex.ott -- -- 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 unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ANN] Pedestal 0.2.0 has been released
We just pushed 0.2.1 to fix some issues with the app-template discovered by Gabe. See https://github.com/pedestal/pedestal/releases/tag/0.2.1 for more info. -Ryan On Aug 30, 2013, at 9:03 PM, Ryan Neufeld r...@thinkrelevance.com wrote: Hey Folks, We've just released 0.2.0 versions of the Pedestal libraries. This is a big one, with revamped templates for both pedestal-app and pedestal-service applications. The biggest change is that developer tooling now lives in *-tools libraries, cleaning up generated projects and making it easier for us to incrementally improve that tooling in the future. You'll also find that pedestal-service now uses Cheshire for JSON reading/writing. All this and more is documented in the 0.2.0 Release Notes. Kudos to everyone that contributed to this release. Happy Labor Day weekend Hacking! - Ryan and the rest of the Pedestal team -- -- 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 unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Compiling Clojure security knowledge
Hej everyone! After a short but interesting discussionhttp://clojure-log.n01se.net/#14:27 on #clojure I'd like to pose some security related questions to a larger audience. This is mostly about user-facing web applications. First some short background: In the main web framework I use, Yesod, there is a clear and concise list http://www.yesodweb.com/page/about (scroll down to Type-safe security) of security issues already handled by the stack. This includes SQL injections, escaping of user input against XSS, CSRF form attacks and such. These aspects are also often mentioned in related tutorials and discussed in the community. Some googling about another well-known web framework, Rails, brought up this page http://guides.rubyonrails.org/security.html with lots of info about securing Rails applications. Now the main question: Where is this info for Clojure's web stack and, assuming there is no collection of info, what do *you* specifically know about security in Clojure? I'm looking to collect information on such matters as * How and where do we prevent SQL injections? In a stack of Hiccup Compojure Ring Korma JDBC Postgres-driver - which (if any) of these components ensures safety against injections? Is there documentation? * How and where do we prevent XSS attacks? Do we have templating engines that escape things unless told otherwise, or - if not - do these features exist in the form of a helper function? If yes, where? (And so on...) * *Where are these things being discussed* in the Clojure community? Googling things like Clojure web security brings up almost nothing. Ideally everybody who knows answers to these points or to points not mentioned by me (go for example through the two sites I linked!) should post what they know with the ultimate goal to create something like the Rails site about our web stack in general, so that future generations don't have to go through the same information hunt. I'm willing to structure the info and write it together if we can collect it, so *go*! (Note that I have also posted this on Reddithttp://www.reddit.com/r/Clojure/comments/1lj3b2/compiling_clojure_security_knowledge/ ) -- -- 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 unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Compiling Clojure security knowledge
Vincent, On Sun, Sep 1, 2013 at 8:06 PM, Vincent Ambo taz...@gmail.com wrote: * *Where are these things being discussed* in the Clojure community? Googling things like Clojure web security brings up almost nothing. Some discussions on this have started on the clojure-sec google group here: https://groups.google.com/forum/#!forum/clojure-sec Started by Chas Emerick after making Friend https://github.com/cemerick/friend Though I think we'd all be happy to have more thinking in this area. cheers, Bruce -- @otfrom | CTO co-founder @MastodonC | mastodonc.com See recent coverage of us in the Economist http://econ.st/WeTd2i and the Financial Times http://on.ft.com/T154BA -- -- 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 unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Java Metadata Wrapper
I was actually thinking of the case where the metadata was computed in some way from the Java object (i.e. when it is more like read-only property). In most of the cases where I have wanted metadata on arbitrary Java objects, this would have been sufficient. You probably want to go the wrapper route if you want first-class metadata behaviour (with-meta et al.) - in effect you would be creating a new kind of object with a new kind of state so it's better to wrap (and maybe simultaneously add a nice wrapper API with idiomatic Clojure style) than to try and pretend that the Java Object is something that it isn't. The alternatives of a global metadata map or some kind of memoization look really messy to implement - they wouldn't play nicely with the varying immutable vs. mutable update semantics that you might see on arbitrary Java objects, they often cause subtle concurrency issues and global state is usually a bad idea anyway. It might just work if you limit yourself to one-off assignment of metadata to object instances, but even that is problematic (cloning the Java object wouldn't preserve metadata, for example) On Sunday, 1 September 2013 21:58:25 UTC+8, Colin Jones wrote: I thought of protocols initially here too, but protocols just define functions, so where would the data live that you want as metadata? A closure over the data? This implies extending the protocol on a per-instance basis, which afaik doesn't exist (cljs design work aside http://dev.clojure.org/display/design/specify+i.e.+reify+for+instances). Some global map? We can't key on arbitrary java objects since the hashcode can change. Is there a key that will work? A var? We can already do that. Maybe there's someplace I'm missing where you could store this data and look it up later via a protocol implementation? -- -- 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 unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Clojure On Java Friendly Microcontrollers, Beaglebone, etc
Here are some updates on my own research. 1. This posthttp://thelibraryofcongress.s3.amazonaws.com/beagleboneled.htmlis a little over a year old, but has the type of information on the BeagleBone I'm looking for. It covers doing some simple I/O using Clojure. The author states that he's unsure what he's doing on the hardware side of things, but it's a start. 2. This post http://nakkaya.com/2011/03/15/clojure-on-the-beagleboard/says it's easy to get Clojure working on the Beagleboard, but is a couple of years old and doesn't give too much detail. I do like that the author does some benchmarking that could be adapted to the BeagleBone Black though. 3. This posthttp://blog.gonzih.me/blog/2012/09/07/clojure-on-beaglebone-openjdk-vs-oracle-embedded-jre-benchmark/is about a year old, and gives a benchmark comparison of OpenJDK vs Oracle's Embedded JRE on a BeagleBone. 4. Videos of Kevin Downey (less than a year old) showing a robot using Clojure on a BeagleBone. He gives some insight into how to make using the Bone's I/O system in Clojure a little easier. 1. Video 1 of 3 https://www.youtube.com/watch?v=XMIKfOmAMjQ 2. Video 2 of 3 https://www.youtube.com/watch?v=QPN2DFrlrYo 3. Video 3 of 3 https://www.youtube.com/watch?v=iQK9p0XV2IY 5. Kevin Downey's Beaglebone robot code on Githubhttps://github.com/hiredman/blackbox . 6. Kevin Downey mentioned clojure-jnahttps://github.com/Chouser/clojure-jna which should make working with native code (to do I/O) on the Bone a little easier. The clojure-jna code on GitHub is about 4 years old though, and I may have read something about a newer replacement on this mailing list. I can't remember for sure though. That's what I've found so far. The information has some age on it and is focused on the older BeagleBone and Beagleboard. It's good information to get started with though I think. On Saturday, August 31, 2013 11:13:59 PM UTC-4, Jeremy Wright wrote: I recently watched Carin Meier's OSCON talk The Joy of Flying Robots with Clojure http://www.youtube.com/watch?v=Ty9QDqV-_Ak and it made me wonder about Clojure on embedded systems. A quick search on this list didn't turn up much so I thought I'd ask. How much work has been done with Clojure on either Java friendly microcontroller systems (i.e. Systronixhttp://www.systronix.com/), or on something like a Beaglebone or Beagleboard? I'm very new to Clojure, so I don't yet understand the challenges that Clojure would face trying to run on a system that may not support all the JVM's features. Any thoughts on this? Any links you can give me on what's been/being done? Thanks. -- -- 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 unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Compiling Clojure security knowledge
On Sun, Sep 1, 2013 at 7:06 PM, Vincent Ambo taz...@gmail.com wrote: * How and where do we prevent XSS attacks? Do we have templating engines that escape things unless told otherwise, or - if not - do these features exist in the form of a helper function? If yes, where? (And so on...) clojars uses https://github.com/ato/clojars-web/blob/master/src/clojars/web/safe_hiccup.clj which automatically escapes. Ivan -- -- 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 unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.