Re: Clojure interop with Spark
Hey Tim, We at Amperity have used Sparkling for our Clojure Spark interop in the past. After a few years of fighting, we eventually ended up with sparkplug ( https://github.com/amperity/sparkplug), which we now use to run all of our production Spark jobs. There is built in support for proper function serialization including wrappers around the Java RDD APIs. We also have some basic support for REPL interaction, but this is fairly limited. We also run on a newer versions of Spark (2.4.4), and haven't had issues with the library when upgrading or changing Spark versions. Let me know if I can help if you're interested! -Jeff On Thursday, July 9, 2020 at 2:36:41 PM UTC-7, Tim Clemons wrote: > > I'm putting together a big data system centered around using Spark > Streaming for data ingest and Spark SQL for querying the stored data. I've > been investigating what options there are for implementing Spark > applications using Clojure. It's been close to a decade since sparkling or > flambo have received any updates and it doesn't look like either will > accommodate recent distributions of Spark. I've found powderkeg an > interesting option, and I like how it supports remote REPLs and the use of > tranducers rather than wrapped Scala fns. However, it looks like it's also > seen a few years without commits and I've heard loose talk that the > developers have moved on to other pursuits. > > Part of the problem seems to be Spark. The project seem unapologetic > about breaking interfaces and seems willing to sacrifice third-party code > that tries to track Spark's development. > > So my options seem to be the following: > > 1. Deploy an older version of Spark that's compatible with one of the > above mentioned libraries. While we don't need to be bleeding edge, > deploying a three year old version just to accommodate my preferred > language is hard to justify. > > 2. Create a merge to update one of those libraries to more recent versions > of Spark and be prepared to maintain it internally for the lifespan of this > project. This may be vastly overestimating my personal heroics. > > 3. Code my own solution from scratch using Java/Scala interop, sketching > out just enough of a Clojure wrapper to suit my ends. > > 4. Learn Scala. > > I realize that Spark isn't the only game in town (Onyx, for example). > However, I'm working with a team of developers who are not familiar with > Clojure (though I'm working to be an advocate). I choose Spark as an > established solution that supports multiple languages and handles both > streaming and batch processing. > > Any insights? Any solutions I'm overlooking? > > > > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/48d98d5c-cf7f-4a63-a2ee-bf86dc2abfe8o%40googlegroups.com.
Re: mu4e:view show email address after display name in message headers
Yes, sorry all for the noise. The message was addressed to the wrong list in Google Groups UI due to pilot error. Deleted the original post but it still goes out to mail interface users. Apologies again. Jeff -- 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/d/optout.
mu4e:view show email address after display name in message headers
I would like to configure mu4e:view to display the email address along with the display name in the To: From: Cc: Bcc: etc fields. Is this possible with current mu4e customization options? The information is already present in the buffer: if I hover over the name with the mouse cursor, email addresses are displayed in a tool tip. That's not ideal for hands on keyboard usage, however. Going a step farther, it would be great to use a function with access to this information to selectively show the email address or otherwise decorate the display name. i.e. Having the display name read: "John Smith (ACME)", or "Fred Factor (outside)" would be highly convenient. Thanks, Jeff -- 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/d/optout.
Re: [ANN] greenlight 0.1.0 - a integration testing framework
Hey Daniel, We use greenlight for end to end integration suites of our services infrastructure. Specifically, greenlight is useful when managing test system lifecycles that include spin up, tear down, and removal of resources created while running tests. Our test systems are generally built from clients of dependent services. The framework additionally provides facilities for managing context built up throughout test steps. We don't currently make any efforts to parallelize or distribute the work outside of partitioning the tests by service in individual libraries; in this way, tests for a particular service can be ran on each deploy or during local development. Thanks, Jeff On Sunday, July 1, 2018 at 6:25:39 PM UTC-4, Daniel Compton wrote: > > Hi Jeff > > This looks very cool. Can you describe a little bit more about how/where > you would use this vs. other kinds of Clojure testing frameworks? The > examples show tests all running within a single process, some using > Component to build up a system map. Do you also use this for inter-process > integration tests? > > Thanks, Daniel. > > On Mon, Jul 2, 2018 at 6:45 AM Jeff Stokes > wrote: > >> Hi, >> >> We've just released a 0.1.0 of our testing framework greenlight >> <https://github.com/amperity/greenlight>. Greenlight provides an >> integration testing framework for systems to give you the confidence to >> greenlight your code to production. This is the first public release of >> this library. >> >> https://github.com/amperity/greenlight >> >> Thanks, >> Jeff >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > -- 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/d/optout.
[ANN] greenlight 0.1.0 - a integration testing framework
Hi, We've just released a 0.1.0 of our testing framework greenlight <https://github.com/amperity/greenlight>. Greenlight provides an integration testing framework for systems to give you the confidence to greenlight your code to production. This is the first public release of this library. https://github.com/amperity/greenlight Thanks, Jeff -- 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/d/optout.
[JOB] Dividend Finance | SF Bay Area | onsite
Hello, At Dividend Finance our goal is to build a frictionless platform to finance solar panel installations. We expose an API to our installer network in addition to our web portal. We are looking for Clojure enthusiasts who can work on site to help us build out the platform. We are interested in candidates who are pragmatic, believe in test automation, and write code with the next maintainer in mind (even if that is a future version of yourself). If you know Clojure, but have not worked with it full time, or are motivated to learn, then this is your chance. Since we are a small team (less than 10 on Tech), you will have a big impact and get the opportunity to wear a lot of hats, not just writing code. You will be responsible for influencing our tools, processes, culture in addition to delivering features. We are located in San Francisco on California @ Sansome, close to the Montgomery BART station. Our stack includes a Clojure web app with Clojurescript (re-frame), Heroku, Postgresql, Github, Box, Docusign, Salesforce, and Heroku. Apply here: https://jobs.lever.co/dividendsolar/ Or email me: jeff.madynski at dividendfinance.com Regards, Jeff -- 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/d/optout.
Re: Why does gen-class executes with *ns* bound to clojure.core?
If I may be so bold to interject -- I'm a colleague of Didier's, and I originally brought this to his attention when I hit this issue at work. I just want to add that part of the confusion arises from some miscommunication/incomplete information on the official docs for Namespaces <https://clojure.org/reference/namespaces>; At the Repl it’s best to use in-ns > <https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/in-ns>, > in which case the new namespace will contain mappings only for the > classnames in java.lang. In order to access the names from the > clojure.core namespace you must execute (clojure.core/refer > 'clojure.core). The user namespace at the Repl has already done this. The current namespace, **ns** can and should be set only with a call to > in-ns > <https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/in-ns> > or > the ns macro > <https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/ns>, > both of which create the namespace if it doesn’t exist. I believe this is a major source of the confusion (at least it was for me). The official documentation *does* mention that in-ns is recommended in the REPL; and in a subsequent paragraph, the official documentation *does* state that in-ns (or ns but it macroexpands to in-ns as well so is just as bad in context) is the preferred way of creating a namespace. But nowhere on the official documentation page does it qualify that *ns*, as a dynamic Var, will require curation if bootstrapping an application from a static context! Instead, users are thrown with the ugly IllegalStateException("Can't change/establish root binding of: *ns* with set"), which is fairly inscrutable in context. (Nowhere else that I'm aware of in the runtime can a user not have ever created a dynamic var themselves, have manipulated it without realizing they're using the set! API, and end up trying to set! it at runtime before calling binding.) It's not a lie or intentionally misleading, but allows an application developer to walk away with an incomplete and inconsistent understanding of the operation of those functions. Somehow the logical decision was taken at every step, but yet there's room for users to trip up here. People who tinker with macros and evals are probably accustomed to battling issues with dynamic vars, or at the very least are remembering that dynamic vars have different semantics, and so can easily search online to discover that they ran afoul of the Var stack frame issue and need to add a binding. But in-ns is a real head-scratcher! If implemented in Clojure, it would look like (set! clojure.core/*ns* (create-ns 'some-namespace)), but because it's defined in RT.java, there's no source available; what's more, the documentation attached to the Var for in-ns doesn't allude to the mechanics it employs. Hands down I can guarantee all Clojure developers who aren't involved in the language maintenance will respond to the exception above by thinking, "Let me check the source using the source macro and see what just happened." They'll call clojure.repl/source and get -- nothing. Then they'll check the docs which say -- "Sets *ns* to the namespace named by the symbol, creating it if needed." While *technically* correct, this is hands down more likely to be read in the colloquial English meaning of "casually changes", rather than the Clojure-technical meaning of "Does something akin to calling `set!`". And they'll either give up after an hour of fruitless searching, or if they have *a lot of free time*, will spend several hours poring over compiler source code <http://justabloginthepark.com/2017/06/18/clojure-and-the-esoteric-mysteries-of-namespaces/> until they realize that nobody documented this case; and that the mechanics at runtime, while internally consistent, are completely counter-intuitive given the information available on the public documentation. I'm glad that you're considering "plugging" the other Clojure entry points to eliminate this stumbling block altogether. In the meantime, perhaps some clarification of the documentation (either those attached to the Var itself, or on the site, or both) are in order? Thanks, - Jeff On Thursday, June 22, 2017 at 3:47:17 PM UTC-4, Didier wrote: > > I opened a Jira enhancement: https://dev.clojure.org/jira/browse/CLJ-2185 > > Hope I did a good job at it. > > On Wednesday, 21 June 2017 18:58:26 UTC-7, Alex Miller wrote: >> >> Was just musing some more - the Clojure Java API was added pretty late >> (~1.6 or 1.7). I wonder if >> >> 1) changing the Java Clojure API to ensure a certain binding context and >> 2) changing the main() method to invoke the Clojure function through the >> Java Clojure API >> >> would be
Re: Clojure with Tensorflow, Torch etc (call for participation, brainstorming etc)
Hi, We've made cortex public: https://github.com/thinktopic/cortex Fork away, and we hope that this contributes to a growing ML community in Clojure. Thoughts, ideas, feedback are welcome! Cheers, Jeff On Saturday, October 8, 2016 at 6:00:21 PM UTC-6, je...@thinktopic.com wrote: > > Hey, > I'm glad this came up. We were initially thinking we'd wait until the > API and design had stabilized before releasing Cortex, but there is enough > of value now that I think Kovas is right. We should release it. > > Cortex has been a collaboration between ThinkTopic and Mike Anderson, and > it's design is somewhat similar to Torch. (Neural network layers that > implement protocols for forward computation and backward propagation of > gradients along with a set of optimizers.) Although we are already using > Cortex models in production, it's definitely still a library in flux. We > had arrived at a pretty good set of base abstractions in pure Clojure using > core.matrix, but then when we decided to add gpu support we realized we had > to refactor things a bit. The CuDNN and CuBLAS libraries from Nvidia > provide a lot of useful functionality, but they also come with their own > abstractions for matrix computation, neural network layers, optimizers, > etc. To take advantage of the GPU effectively we also need to be able to > sequence and interleave tasks using streams, which requires a variety of > design changes unless we want to maintain separate implementations of > almost everything for both the CPU and the GPU. You can build and run > networks now, but we are still exploring how this should all come together. > > So, as long as you keep in mind that things will change, it would be great > to have you all join the conversation and help experiment with abstractions > and apis. > > Give us a couple days to do some house keeping, and then we'll open source > it. > > -Jeff > > > On Thursday, October 6, 2016 at 8:08:41 PM UTC-6, kovasb wrote: >> >> On Thu, Oct 6, 2016 at 9:20 PM, Mikera <mike.r.an...@gmail.com> wrote: >> >>> Hi Dragan, >>> >>> We have things working quite well (including stuff like cuDNN >>> integration for convolution networks on the GPU). We also have all of the >>> standard stuff (many different layer types, dropout, noise function, >>> regularisation etc.). However I think it still needs a bunch of work before >>> we stabilise on the core API. >>> >> >> >>> Things I'm paricularly keen to have nailed down in particular before we >>> go public: >>> >> >> FWIW it sounds like you've achieved a huge amount already. >> >> There are many people in the Clojure community who can come up with a DAG >> abstraction. There are very, very few who have the skill and time to assess >> and integrate the various native libs necessary to achieve the fundamental >> operations in a clojure-friendly way. >> >> If people build on the 'wrong' api, thats a good problem to have. The >> field is so in flux anyway. The problem can also be mitigated through >> minimalism in what is released in the beginning. >> >> In any case, looking forward to hopefully seeing this stuff one day. >> >> >> >> >> >> -- 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/d/optout.
Re: Clojure with Tensorflow, Torch etc (call for participation, brainstorming etc)
Hey, I'm glad this came up. We were initially thinking we'd wait until the API and design had stabilized before releasing Cortex, but there is enough of value now that I think Kovas is right. We should release it. Cortex has been a collaboration between ThinkTopic and Mike Anderson, and it's design is somewhat similar to Torch. (Neural network layers that implement protocols for forward computation and backward propagation of gradients along with a set of optimizers.) Although we are already using Cortex models in production, it's definitely still a library in flux. We had arrived at a pretty good set of base abstractions in pure Clojure using core.matrix, but then when we decided to add gpu support we realized we had to refactor things a bit. The CuDNN and CuBLAS libraries from Nvidia provide a lot of useful functionality, but they also come with their own abstractions for matrix computation, neural network layers, optimizers, etc. To take advantage of the GPU effectively we also need to be able to sequence and interleave tasks using streams, which requires a variety of design changes unless we want to maintain separate implementations of almost everything for both the CPU and the GPU. You can build and run networks now, but we are still exploring how this should all come together. So, as long as you keep in mind that things will change, it would be great to have you all join the conversation and help experiment with abstractions and apis. Give us a couple days to do some house keeping, and then we'll open source it. -Jeff On Thursday, October 6, 2016 at 8:08:41 PM UTC-6, kovasb wrote: > > On Thu, Oct 6, 2016 at 9:20 PM, Mikera <mike.r.an...@gmail.com > > wrote: > >> Hi Dragan, >> >> We have things working quite well (including stuff like cuDNN integration >> for convolution networks on the GPU). We also have all of the standard >> stuff (many different layer types, dropout, noise function, regularisation >> etc.). However I think it still needs a bunch of work before we stabilise >> on the core API. >> > > >> Things I'm paricularly keen to have nailed down in particular before we >> go public: >> > > FWIW it sounds like you've achieved a huge amount already. > > There are many people in the Clojure community who can come up with a DAG > abstraction. There are very, very few who have the skill and time to assess > and integrate the various native libs necessary to achieve the fundamental > operations in a clojure-friendly way. > > If people build on the 'wrong' api, thats a good problem to have. The > field is so in flux anyway. The problem can also be mitigated through > minimalism in what is released in the beginning. > > In any case, looking forward to hopefully seeing this stuff one day. > > > > > > -- 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/d/optout.
Re: definterface odd error
Thanks for all the help on this! The "..." comment helped me sort it out and I have it working now! On Friday, September 23, 2016 at 4:12:51 PM UTC-4, adrian...@mail.yu.edu wrote: > > Hey Jeff, > > The problem is that the code in that blog post is not amenable to > copy/paste. The ellipses are standing in for other parts of the code they > are leaving out. The exception you're seeing is basically saying that the > symbol "..." cannot be treated like an indexed collection. The syntax for > definterface expects a body of lists that spell out the method prototypes > for that interface. > > On Friday, September 23, 2016 at 3:54:44 PM UTC-4, Jeff Murphy wrote: >> >> Hi, I'm working with Clojure for the first time and am following a post >> to implement a binary tree. However, the code results in an error that I've >> been unable to figure out. >> >> Post is here >> http://macromancy.com/2014/04/09/data-structures-clojure-trees.html >> >> Error is >> >> >> Exception in thread "main" java.lang.UnsupportedOperationException: nth >> not supported on this type: Symbol >> >> >> >> The piece of code (if I paste into REPL) that causes the error is: >> >> >> (definterface INode >> ... >> (insert [k v])) >> >> >> >> If anyone can help me out with a hint/explanation, that would be awesome! >> >> >> thanks! >> jeff >> >> >> -- 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/d/optout.
definterface odd error
Hi, I'm working with Clojure for the first time and am following a post to implement a binary tree. However, the code results in an error that I've been unable to figure out. Post is here http://macromancy.com/2014/04/09/data-structures-clojure-trees.html Error is Exception in thread "main" java.lang.UnsupportedOperationException: nth not supported on this type: Symbol The piece of code (if I paste into REPL) that causes the error is: (definterface INode ... (insert [k v])) If anyone can help me out with a hint/explanation, that would be awesome! thanks! jeff -- 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/d/optout.
Re: ANN metrics-clojure 2.6.0 is released
Congratulations, I look forward to using this, upgrading to 3.1 is great and the features on the release notes (really nice to have clear, concise release notes) will make using it much better. On Monday, November 30, 2015 at 10:30:10 AM UTC-8, Michael Klishin wrote: > > metrics-clojure is a Clojure interface to the DropWizard Metrics > library. > > Release notes: > > https://github.com/sjl/metrics-clojure/blob/master/ChangeLog.md#changes-between-250-and-260 > -- > MK > > http://github.com/michaelklishin > http://twitter.com/michaelklishin > -- 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/d/optout.
Re: Using cookies with clj-http.client
I don't see any problem with your code. Try to add :debug true to both of those maps and look at the output. Ensure that for both URLs share exact same hostname and protocol http/https. Look at the Set-Cookie header in the POST response and ensure that the path matches the url in the GET. On Sunday, November 8, 2015 at 8:15:17 PM UTC-8, Mike wrote: > > Hello, > > I have a web site that uses cookies for authentication. You logon to a > specific URL with your username and password using a POST (which I have > working; I get a 200 status back) which should create a cookie; then you > use the cookie for all future access to the web site. > > I have all of this working on a Windows client using PowerShell. I'm > trying to expand my horizons and start using Clojure for my projects. So > I'm trying to take my working PowerShell script and re-implement it in > Clojure. > > I read the section in the *clj-http.client* documentation about using a > cookie store and I thought I did it correctly. Here's what I did: > > (require '[clj-http.client :as client]) > > (def my-cs (clj-http.cookies/cookie-store)) > (client/post login-URL {:body post-data > :cookie-store my-cs}) > (client/get customer-list-URL {:cookie-store my-cs}) > > I was hoping to get a cookie shoved into *my-cs* and then be able to use > it in future accesses. The *client/post* call gets a 200 status back, > but when I try to look at *my-cs* it is *nil*. What am I doing wrong? > TIA! > -- 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/d/optout.
cider-nrepl not installed (emacs24)
>From emac24 I installed the cider package from melpa, but get the following warning when running the repl: ; CIDER 0.10.0snapshot (package: 20150918.919) (Java 1.7.0_79, Clojure 1.7.0, nREPL 0.2.10) WARNING: The following required nREPL ops are not supported: apropos classpath complete eldoc format-code format-edn info inspect-pop inspect-push inspect-refresh macroexpand ns-list ns-vars ns-path refresh resource stacktrace toggle-trace-var toggle-trace-ns undef Please, install (or update) cider-nrepl 0.10.0-SNAPSHOT and restart CIDER ERROR: CIDER's version (0.10.0-snapshot) does not match cider-nrepl's version (not installed). Things will break! I do not see either a cider-nrepl or nrepl package available on melpa or marmalade. -Jeff -- 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/d/optout.
Re: cider-nrepl not installed (emacs24)
Thanks, Richard. That got the process started, but it then aborted with: error in process filter: nrepl-log-message: Wrong number of arguments: (1 . 1), 0 Since I'm starting with Clojure and there's a users meeting in a couple days, I'll bring my laptop out to the meeting. There's no rush to get started on a project yet, I'm just in the process of getting a decent environment set up for learning the language. Thanks for your help. -Jeff On Saturday, September 19, 2015 at 11:56:33 AM UTC-5, Richard Norton wrote: > > I ran into a similar problem. > > Ended up following the advice here: > - https://github.com/clojure-emacs/cider-nrepl > > Setting ~/.lein/profiles.clj to this helped: > {:user {:plugins [[cider/cider-nrepl "0.10.0-SNAPSHOT"]]}} > > HTH, > > Richard > > > On Sat, Sep 19, 2015 at 8:12 AM, Jeff Bauer <jeff...@gmail.com > > wrote: > >> From emac24 I installed the cider package from melpa, but get the >> following warning when running the repl: >> >> ; CIDER 0.10.0snapshot (package: 20150918.919) (Java 1.7.0_79, Clojure >> 1.7.0, nREPL 0.2.10) >> WARNING: The following required nREPL ops are not supported: >> apropos classpath complete eldoc format-code format-edn info inspect-pop >> inspect-push inspect-refresh macroexpand ns-list ns-vars ns-path refresh >> resource stacktrace toggle-trace-var toggle-trace-ns undef >> Please, install (or update) cider-nrepl 0.10.0-SNAPSHOT and restart CIDER >> ERROR: CIDER's version (0.10.0-snapshot) does not match cider-nrepl's >> version (not installed). Things will break! >> >> I do not see either a cider-nrepl or nrepl package available on melpa or >> marmalade. >> >> -Jeff >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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/d/optout.
usage of "and"
I am reading Clojure Applied, which I am enjoying. One code snippet is puzzling for me, can someone please explain why the authors used: (and (pos? cnt) instead of just (pos? cnt) ? Or to go further, (pos? (item @inventory)) The best I could think is that there used to be a check for two things: 1) that the entry was present in the map AND 2) the value for the entry was positive. But maybe there is some idiomatic use of "and" that I don't know about. The inventory atom is a map whose key is a keyword like :milk and the value is a count representing how many are left. (defn in-stock? "check if an item is in stock" [item] (let [cnt (item @inventory)] (and (pos? cnt Excerpt From: Ben Vandgrift, Alex Miller. “Clojure Applied P1.” iBooks. -- 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/d/optout.
Re: Newbie
I quite like these two resources for total beginners. (Starts up assuming you know nothing about Lisp.) aphyr.com/tags/Clojure-from-the-ground-up (Quite humorous) http://www.braveclojure.com/ -- 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/d/optout.
Re: clojure, not the go to for data science
RStudio is really nice! I'm taking some Coursera classes using R, and RStudio is great. Maybe that's because I'm an IDE kind of guy: using Cursive for Clojure, PyCharm for Python, RStudio for R, etc. On Thursday, April 2, 2015 at 5:54:34 PM UTC-4, Jony Hudson wrote: I think the credit here has to go to RStudio for doing such a good job of making an easy to install complete development environment. I'd say just comparing base Clojure to base R, it's a wash. Install java and either download the Clojure jar, or the leiningen script, and you're good to go. Similar effort with R, just install the R distribution. Either way you don't get much more than a REPL prompt. It is possible to get a working, fully-featured Clojure development environment going without *much* more difficulty than RStudio. In fact, I did precisely cover install and setup in two easy videos :-) See http://gorilla-repl.org/videos.html , bottom of the page. I would still say that RStudio deserves kudos here though, as they've made it really easy to get going. And I think there is value in this, as my experience with getting inexperienced programmers started is that they easily get stuck on the little set up details. I'd like to make Gorilla REPL easier to get started with, but haven't figured out how to do that in a way that's compatible with the amount of time I have to work on it! Jony On Thursday, 2 April 2015 22:14:08 UTC+1, Sayth Renshaw wrote: You appear to have vastly misinterpreted my intention regards Emacs. My mention of Emacs (I use emacs with prelude) was not based on my usage but as a perception of those who might be attracted to Clojure For Purely Data Science And wishes to get installed and moving quickly. R offers to get you installed in 2 quick point and click installs and gives you the language and R studio . What would that person think when looking at Clojure? If they saw emacs would they know about prelude, how to configure it with so many configuration options? If someone out organisation was running a data science course would they choose R because they can cover install and setup in 2 easy videos compared to current Clojure options which may be less clear. Sometimes often times onboarding people to a new language is about as much as ease of install or at least making a default set of optiins clear. Could the default set abs best options be made easier to new comers? Sayth Emacs can use the native windowing system on every major platform. It still *looks* like a terminal app, but doesn't have to be one. Pretty much everything you are saying here doesn't apply to Emacs at all, and you would know it's all false if you knew anything about Emacs. On Wednesday, April 1, 2015 at 4:55:08 PM UTC-7, Fluid Dynamics wrote: On Tuesday, March 31, 2015 at 8:45:31 AM UTC-4, Phillip Lord wrote: The benefit is that Emacs is that its not constantly changing, and it gives you some stability over the years. I like latex, for instance, for the same reason. I can still access a 10 year old document and use it. First of all, there are other posts in this thread complaining about constantly changing stuff breaking things! One such post is by Colin Yates. Second, to the extent that it isn't changing, it is legacy. Which helps to explain the Wordperfect for DOS style of UI, which is dependent on vast numbers of complex key-combinations being memorized by the user, instead of a just-sit-down-and-start-using-it UI like everything originating after, say, 1995 or so has tended to have. Of course, the result is that Wordperfect (and emacs) seemed to require a great deal of specialized training just to accomplish even the most basic tasks, whereas with modern interfaces the way to do such basic tasks (save, open, copy and paste, move around, select, etc.) tends to be obvious and special training can focus exclusively on doing advanced things (scripting, complicated Photoshop filters and tricks, things like those). Legacy also, obviously, tends to present problems in other areas besides UI-boneheadedness: * I18n and l10n * Compatibility, with modern hardware and with modern operating systems, though that can be alleviated by people porting the code * Boneheaded internal limits, along the same general lines as 640K ought to be enough for anybody. It may be unable to use more than a small fraction of what modern hardware can offer it in the way of memory, storage, cores, ... * Accessibility. Interposing a terminal emulator between the app and screen reading software might cause problems, though on the other hand a text mode app may ultimately have advantages in that area too. On the other hand, it may not play well with accessibility tools that rely on standard UI conventions. Anything that responds to some voice command by generating control-V keystrokes to paste, or that relies on the presence of
Re: Clojure terminology
+1 on this. I was really (pleasantly) surprised by this approach. On Friday, September 12, 2014 4:58:45 AM UTC-4, Niels van Klaveren wrote: http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome. Kyle Kingsbury's Clojure from the ground up has an excellent introduction about symbols, vars and quoting where he introduces them in the beginning of the course which makes things pretty clear and which makes the steo up to macro's less complicated than any of the Clojure books I've read. -- 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/d/optout.
Re: Determine file of auxiliary test method with clojure.test?
You could override the clojure.test/do-report implementation and use the same stack frame trick that the default :fail case uses. Then from there, either use the file name from the StackTraceElement, or demunge the method name to get the var. I wouldn't really call that obvious, though. :-) Cheers, Jeff -- 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/d/optout.
Re: Is it the right Clojure group for a newbie
As far as I know, this book is not free to distribute. On Friday, June 6, 2014 9:32:27 AM UTC-4, douglas smith wrote: here is pdf of Little Schemer http://scottn.us/downloads/The_Little_Schemer.pdf On Friday, June 6, 2014 9:17:58 AM UTC-4, douglas smith wrote: Sounds like we are in a similar position. Maybe we could start a study group of sorts. -not sure how? We could post back to this thread for now and see what happens. Someone have a better suggestion? Doug On Monday, June 2, 2014 5:36:51 PM UTC-4, shar...@gmail.com wrote: All, If this is the right Clojure group for a newbie, I would like to ask for the best online resources to begin with. I am new to programming, having recently switched from a non technical field. I have started looking at http://www.braveclojure.com/, but any pointers would be useful, especially cookbook styled ones. Abha -- 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/d/optout.
Re: ANN: [R User Conference]
R is quirky, but really nice. Not to hijack too much the group, but if you learn better with interactive introductions, like me, here are two nice interactive introductions to R : https://www.codeschool.com/courses/try-r (Very humorous) https://www.datacamp.com/courses/introduction-to-r (More serious) -- 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/d/optout.
Re: Clojure source releases issue for Maven Central
Thanks, Alex. On Monday, April 21, 2014 4:30:09 PM UTC-4, Alex Miller wrote: Seems to have been fixed only for snapshots; reopened. -- 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/d/optout.
Clojure source releases issue for Maven Central
Current builds of the Clojure sources jar (clojure-1.6.0-sources.jar, clojure-1.5.1-sources.jar, etc) available from the Maven Central releases repository contain the errant versions.properties file noted in issue CLJ-1161 [1] . The fix for that issue can be seen in the Central repo labelled clojure-1239 (staging?), but not in releases: OK: clojure-1239 001918a4c1e544a66d4bc6c84429694d clojure-1.6.0-sources.jar [2] Bad: releases 1c03eec13fbd86083230c3e97ea5bab7 clojure-1.6.0-sources.jar [3] Could someone who is more familiar with the Clojure build/upload process shed some light on this? Cheers, Jeff [1] http://dev.clojure.org/jira/browse/CLJ-1161 [2] https://oss.sonatype.org/index.html#view-repositories;orgclojure-1239~browsestorage~/org/clojure/clojure/1.6.0/clojure-1.6.0-sources.jar [3] https://oss.sonatype.org/index.html#view-repositories;releases~browsestorage~/org/clojure/clojure/1.6.0/clojure-1.6.0-sources.jar -- 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/d/optout.
every? expected behavior
Hi, I am new to Clojure, so please forgive me if this does not make sense. I was surprised to find out in the REPL that every? returns true if you pass in an empty or nil collection. user= (every? #(= 77 %) nil) true user= (every? #(= 77 %) '()) true I looked at the source for every? and it made sense to me why this happens given that every? is recursive and the termination condition is when coll runs out of items to process. Would it make more sense to define every? with a loop, or is the caller expected to know better than to call it with nil? Thanks, --jeff (defn every2? Returns true if (pred x) is logical true for every x in coll, else false. {:tag Boolean :added 1.0 :static true} [pred coll] (if (empty? coll) false (loop [c coll] (cond (nil? (seq c)) true (pred (first c)) (recur (next c)) :else false -- 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/d/optout.
Re: every? expected behavior
Thanks to all for the nice explanations. I understand the reasoning. On Tuesday, April 8, 2014 1:53:44 AM UTC-7, Colin Yates wrote: Depends who is doing the expecting as to whether that behaviour is correct. Formal logicians, mathematicians, computer scientists etc. would respond sure, it is vacously true. For almost everybody else it feels wrong but is then true when you think about it a bit. I would suggest the question you are trying to ask is (and (not (empty? nil)) (every? #(= 77 %) nil)). For more info check out http://en.wikipedia.org/wiki/Vacuous_truth. On Tuesday, 8 April 2014 07:08:56 UTC+1, Jeff Mad wrote: Hi, I am new to Clojure, so please forgive me if this does not make sense. I was surprised to find out in the REPL that every? returns true if you pass in an empty or nil collection. user= (every? #(= 77 %) nil) true user= (every? #(= 77 %) '()) true I looked at the source for every? and it made sense to me why this happens given that every? is recursive and the termination condition is when coll runs out of items to process. Would it make more sense to define every? with a loop, or is the caller expected to know better than to call it with nil? Thanks, --jeff (defn every2? Returns true if (pred x) is logical true for every x in coll, else false. {:tag Boolean :added 1.0 :static true} [pred coll] (if (empty? coll) false (loop [c coll] (cond (nil? (seq c)) true (pred (first c)) (recur (next c)) :else false -- 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/d/optout.
Re: om: state management considerations
There is some explanation about component local state in the documentation here: https://github.com/swannodette/om/wiki/Conceptual-overview UI components will often have transient state that really doesn't make sense to expose externally. For example the characters in an input as someone is typing, or the highlighted? bool for some mouse-over logic, that kind of thing. Also, component local state is always up to date, whereas the global state is updated in a more stepwise fashion with each call of the render loop. -Jeff On Thursday, March 27, 2014 4:20:41 PM UTC+8, rlewczuk wrote: Hi, After playing a bit with om, I'm somewhat confused about state maintaining possibilities it offers. There is global application state and local component state. I have some doubts about using local state as it seems to lead to troubles as soon as code grows a bit (I'm thinking about traditional widgets, eg. data table with editing capability - somewhat boring stuff, yet quite common in many cases). Most common approach to this seems to be to set up some local state and then use core.async channels for communication and updating global state asynchronousluy (go ...) blocks. My feeling is that it creates lots of places with application state which negates to some extent main premise of state handling by om. Do I need to use local state at all ? Are there any alternatives ? I'm thinking about using keyword namespacing in global state to separate concerns, for example viewed data table row could be kept as something like :d/current-row somewhere in global state ('d' stands for data) but when row editing starts :e/current-row appears and is used by input fields ('e' stands for editing). UI configuration (column descriptions etc.) would use 'u' prefix (eg. :u/columns) for example etc. My feeling is that keeping application state strictly in global state would make some things easier (testing+debugging UI components, recording user sessions in full detail by listening on :tx-listen etc.). But blindly following all-in-global state also can have its pitfalls that I'm not aware of (as cljs/reactjs/om newbie). There are the following aspects of UI state as I see it: - hardcoded UI config data (widget descriptions, column descriptions etc.); - customizable UI config data (eg. skins and styles that application user can choose); - UI code (function references sometimes bound somewhere to application state); - UI state (eg. currently edited data, flags marking that data is being edited/viewed row being selected etc.) - business data (fetched REST from backend); - inherently stateful stuff (eg. core.async channels); - etc. My question is: where would you recommend placing individual bits of config/data/state listed above (global state? local state? :opts ? global :shared ? etc.) ? Regards, rle -- 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/d/optout.
Re: [ANN] Gorilla REPL initial release (0.1.2)
Hey, this looks really great, and if it could be made easily extensible I think it could gain a lot of traction. From a quick glance I have a couple thoughts: * Clojurescript!!! Why do all this work in Javascript? This is a project made for clojurescript, core.async, and maybe Om. - To make this transition feasible the existing javascript could be used like a library from a clojurescript shell that can then grow. * Being able to render values of different types is important, and I think it deserves a lot of attention in both the design and documentation. There are some values that will need server side rendering, others client side, and some both. If you can define a set of protocols for each side of this channel then people would ideally be able to quickly add support for whatever data is relevant to their project with a couple extensions. - This could be extended for values inside comments, like your latex support, by have a special comment reader that people could define reader macros for. * Also there will be some types of interaction with values that will require setting up server side state in order to work correctly. For example, it would be great to be able to define a synthesizer in Overtone and then get a button in the browser that you can click to trigger its execution on the server, pause, play, stop, and tweak parameters. Or for longer running processes, like training a neural network, it would be great to be able to setup communication between the model training on the server and a live chart in the browser. (e.g. You could 'fork' off named channels from the primary communication channel between client and server to transmit data between handlers on each side.) * When saving to a file it would be great to have a mode that only saved the code and the markdown in clean comments, without all the cruft. Very cool, and I look forward to experimenting and helping out. Thanks! -Jeff On Thursday, February 20, 2014 5:23:02 AM UTC+8, Jony Hudson wrote: Hi All, I'm pleased to announce the first release of Gorilla REPL, a rich REPL in the notebook style: https://github.com/JonyEpsilon/gorilla-repl From the README: You can think of it like a pretty REPL that can plot graphs, or you can think of it as an editor for rich documents that can contain interactive Clojure code, graphs, table, notes, LaTeX formulae. Whatever works for you! One of the main aims is to make it lightweight enough that you can use it day-to-day instead of the command-line REPL, but also offer the power to perform and document complex data analysis and modelling tasks. Above all else, Gorilla tries not to dictate your workflow, but rather to fit in to the way you like to work, hopefully putting a bit more power to your elbow. You might like to take a look at a video introduction that shows what it does better than my poor prose describes it: https://vimeo.com/87118206 I hope you like it and find it useful. In particular I really hope it fits in to your workflow, and if not it would be great to know why. Bear in mind it is very new and hasn't had a lot of testing, so caveat evaluator. In particular: * I've done very limited testing other than on Safari on Mac. I've checked that it works in most of the major browsers on Windows and Mac, but that's about it! * At the moment you can only open one window otherwise it breaks (silently!). I'd love some help on the bug that's blocking this from someone who understands nREPL better than me. https://github.com/JonyEpsilon/gorilla-repl/issues/10 * It relies on an internet connection at the moment, at least until it caches various fonts. Need to get in touch with someone at clojars about size limitations. I think there's a lot still to be done, and there are some areas that would really benefit from feedback from clojure developers more experienced than me. Directions I'd love to see explored: * More work on plotting. Still very green, and much could be improved. * Incanter integration. If I've understood correctly, Incanter can generate SVG, so shouldn't be too difficult. * Content-types. Currently values are tagged to indicate they should be rendered specially by the front-end. Is this the right way to do it? What about tagged literals? * UI as a value. There's a lot that could be done with custom rendering of values. Mathematica is particularly impressive in this regard, and it would be interesting to think where this could go with clojure. I know Kovas Boguta has thought about this a lot. * Clojurescript! I think this is a _really_ interesting one. I'd love to see a pure-client-version that uses a clojurescript REPL server in a web-worker or similar. I came to write Gorilla through thinking about this angle originally, having previously messed around with javascript based data analysis in the browser (see http://monkeycruncher.org - cute idea
Re: Sorting Nested Vectors and filter out some
Hi Cedric, Thanksvery insightful! On Sunday, January 5, 2014 1:30:07 AM UTC+3, Cedric Greevey wrote: You might wish to consider a different data structure. For example, the inner objects might be better off as maps with named keys, so your lookup keys would be things like :amount rather than 5. And instead of out of band values like the string N/A you'd just omit a mapping in such cases. At the very least you may wish to consider using nil instead of N/A as an out of band value for not there. But a map would allow easily adding more data later on, as well as enable giving the lookup keys meaningful names, and would keep the existing keys stable when new ones were added. A map may also perform better if you end up with a lot of optional keys, as missing mappings don't take up space while N/A values in a vector do. As for naming integer positions using constants, such as (def amount 5), there are two weaknesses with that approach. First, inserting new values will shift all of the existing ones that are farther to the right to higher indices, so you'd have to change amount to 6 and hope you hadn't missed any direct lookups with 5 instead of amount. But if you use a map with a key of :amount, adding more keys can never move the actual amount value away from :amount. And second, you can namespace keys to avoid collisions, with :my-ns/amount and :other-ns/amount not colliding. You can namespace def'd integer constants too, with (in-ns 'my-ns) (def amount 5) and (in-ns 'other-ns) (def amount 7), but if one day you end up with a situation where two namespaces def two different things to the key 5, the namespacing isn't going to help you. Maps with named and namespaceable :keyword keys are much more robust and scalable in large (or potentially-in-the-future-large) projects and in the presence of many optional keys. With Clojure, it's strongly recommended to use maps with named keys instead of positionally-significant entries in vectors to represent structured tuples of data like you seem to have here. The robustness becomes especially significant if you save and load data and keep old data around as the application grows. If you reorder the vectors, or insert new fields before existing ones, and then read in old data, the values will end up with the wrong keys, whereas if you use maps, keywords, and edn format the values in old data can never end up reading back in with the wrong keys (as long as you never rename already-used keys for any reason, which with meaningful names and especially namespacing you should never need to do). -- -- 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: Sorting Nested Vectors and filter out some
Hi...I get my nested vector from a database, then map a function that formats it and computes the deviation, actual data looks like below..so I don't have any keys within the the vector, ..would like to sort by index 5 in in each vector descending and if index 5 is N/A (not e.g a percentage)remove it from the list [[151819 ANTI HUMAN GLOBULIN SERUM 5ML 6.0 0 0 N/A N/A] [151090 ANTI SERUM A 10ML 6.0 0 0 N/A N/A] [151094 ANTI SERUM AB 10ML 6.0 0 0 N/A N/A] [151092 ANTI SERUM B 10ML 6.0 0 0 N/A N/A] [151095 ANTI SERUM D 10ML 6.0 0 0 N/A N/A] [151825 BLOOD GLUCOSE GLUCOMETER-CONTOUR 0 0 0 N/A N/A] [151829 BLOOD GLUCOSE STRIPS(50 STRIPS)-CONTOUR 12.0 360.0 0 3000.00 % N/A] [151828 BLOOD GLUCOSE STRIPS(50 STRIPS)-SURESTEP 0 360.0 0 N/A N/A]] Thanks again On Friday, January 3, 2014 9:33:42 PM UTC+3, john walker wrote: You can do something like this. https://gist.github.com/johnwalker/8243534 On Friday, January 3, 2014 12:37:07 PM UTC-5, Jeff Angle wrote: Hi guys! this has made me pull quite a load of hair new to clojure.. have a nested vector say [[salt 0 0 %deviation 00] [sugar 5 10 %deviation 5$10] [milk 1 2 %deviation 12 ] [bread] ...] where % deviation is the actual figure of evaluting the deviation between e.g 5 and 10 for sugar, I want to sort using % deviation and also filter out those with deviations of 0. Please help, will revenge when I master functional programing with clojure -- -- 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.
Sorting Nested Vectors and filter out some
Hi guys! this has made me pull quite a load of hair new to clojure.. have a nested vector say [[salt 0 0 %deviation 00] [sugar 5 10 %deviation 5$10] [milk 1 2 %deviation 12 ] [bread] ...] where % deviation is the actual figure of evaluting the deviation between e.g 5 and 10 for sugar, I want to sort using % deviation and also filter out those with deviations of 0. Please help, will revenge when I master functional programing with clojure -- -- 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: Is Clojure right for me?
Given your goals of evaluating the language quickly, not having a lot of free time to devote to it, and having to get productive fast in a web environment, I think a better avenue to explore would be Groovyhttp://groovy.codehaus.org/alongside Spring Boothttp://spring.io/blog/2013/08/06/spring-boot-simplifying-spring-for-everyoneor Ratpack http://www.infoq.com/presentations/Ratpack. It's concise, close to Java OO, and yet have functional programming features and metaprogramming facilities. On Friday, December 27, 2013 7:54:44 AM UTC-5, Massimiliano Tomassoli wrote: The point is that Clojure is not the only modern language out there. I can't possibly learn them all in depth just to decide which language to use for my production code. That would be time-inefficient because my goal in not to learn languages, but to pick up a new language suitable for my needs. -- -- 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: Is Clojure right for me?
On Thursday, December 26, 2013 11:32:51 AM UTC-5, Massimiliano Tomassoli wrote: Thank you, Malcolm. I'm completely new to LISP and its dialects and I'm a little bit worried about the absence of support for OOP in Clojure. How do you decompose large systems in Clojure? This presentation has been really helpful in that regard for me: Clojure in the Largehttp://www.infoq.com/presentations/Clojure-Large-scale-patterns-techniques Even though Clojure is not OOP in the way Java is, you can go a long way with Protocols and namespaces, imho. -- -- 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: [Job spam] Write Clojure in your pajamas, for decent money in a pleasant company, remote pairing all the time
On Tuesday, November 19, 2013 7:44:33 PM UTC-5, Alexey Verkhovsky wrote: Back to the original subject of the thread, it looks like either there is more Clojure work than people with platform expertise, or Clojure is a mostly South American phenomenon. One way or the other, South America is the only place I've got any responses from so far. {puzzled} We are only hiring master programmers and very strong journeymen. My guess is master programmers in the US already have plenty of opportunities to thrive at exciting places and are probably already established in excellent companies, whereas as in other countries it might be harder to find such excellent work conditions and the opportunity to work remotely for your company makes it extra attractive. -- -- 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] Yesql 0.2.1 - Clojure SQL queries rethought.
In Java land at work,We use Spring jdbc templates and we inject the SQL queries in a map from a single .xml or property file. Queries are accessed from the map with key names like selectAddressesForClient. Perhaps a similar query lookup scheme could optionally be used with Yesql. -- -- 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 - Where to start?
I think it was this post I had seen, from the code design in Clojure thread: https://groups.google.com/d/msg/clojure/-oJmddtX4Fg/4Ub8JSiWr1IJ Paul deGrandis 10/18/12 Brian, Those are two excellent books. If you are looking at more general project organization and approaches, I'd suggest: - Just Enough Architecture (specifically its discussion on architectural evident coding) - watch the Halloway talks on evident code - thumb through Ring, Leiningen, and ClojureScript as prime examples of well written Clojure applications - watch the Google tech talk on designing good APIs ( http://www.youtube.com/watch?v=aAb7hSCtvGw) - and you might find a book like Higher-Order Perl helpful (depending where you're coming from) Hope one (or all) of these help! Paul On Friday, October 11, 2013 4:19:03 AM UTC-4, albert cortez wrote: That sounds pretty interesting. I wonder how old the list was. If it was made a while ago, i'm sure there are new projects that have come along. If you find the link I would be interested. -- -- 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 - Where to start?
I remember reading a post with a list of open source projects with excellent clojure code. Unfortunately, I can't find it anymore, but I remember Ring was on the list. -- -- 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] Cognitect
Fantastic news. Congrats to all involved! -- -- 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] Nightcode, an IDE for Clojure and Java
That's really cool. Thank you for doing this! I really like the import feature, coloring and keyboard friendlyness. If I can suggest the one feature that I couldn't bear to use an IDE without: Strict Structural Editing Mode (paredit-style)https://code.google.com/p/counterclockwise/wiki/EditorKeyBindingsFeatures#Strict_Structural_Editing_Mode_(paredit-style) Basically I get pissed-off if an editor kills my selected expression when I type a paren or some other twin delimiter 8) I even wish I had it when editing other languages than Clojure. -- -- 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.
core.async: How to signal worker completion
I would like to signal after a channel is drained AND subsequently processed by workers inside go blocks. My understanding is that I could return a channel in my worker function and then close the channel when all of the workers have finished to signal completion. Since the channel can only be closed once, I must ensure that the last worker completed is the only one to call close. To maintain this state I am counting the number of workers completed using an atom. When a worker reads a Nil from the input channel, it increments the workers finished count and closes the channel if all other workers have finished. The code below is working but is there a better way to do this without relying on the atom? https://gist.github.com/LAMF/6093294 (def work 10) (def workers 2) (defn make-work [] (let [c (chan work)] (dotimes [i work] (!! c i)) (close! c) c)) (defn do-work [c] (let [out (chan) completed (atom 0) finish (fn [] (swap! completed inc) (if (= @completed workers) (close! out)))] (dotimes [i workers] (go (loop [] (when-let [i (! c)] (! (timeout (rand-int 500))) (println i) (recur))) (finish))) 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 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: is intellij idea a good ide for clojure development?
it happens all the time. In a sense, it's not weirder than making free software for proprietary operating systems 8) On Thursday, July 25, 2013 11:15:15 PM UTC-4, Cedric Greevey wrote: Someone makes free software plugins for nonfree software?! -- -- 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: Elegance vs. Performance?
Maybe the Shen programming language could be of interest to you. http://shenlanguage.org/ It's a portable functional typed dialect of Lisp. Looks quite elegant to me, and it targets Clojure, amongst other languages. -- -- 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: A blocking lazy sequence populated by multiple worker threads
If you are looking for a more idiomatic solution, https://github.com/jpalmucci/clj-yield wraps a lazy sequence around a blocking queue. On May 30, 2013, at 11:58 AM, Artem Boytsov aboyt...@gmail.com wrote: Hello, Colin, I suspected I should turn to existing Java concurrency constructs. Thank you very much for your response, and this is what I'm going to do. I was just hoping there's some Clojure idiomatic way to solve this, using agents, futures, promises, refs, and other Clojure stuff. For example, if there were a function taking a list of agents and return any one of them which is ready (vs. all of them), I would be able to implement my example relatively simply. Just wanted to make sure I'm not missing anything. Artem. On Thursday, May 30, 2013 2:12:02 AM UTC-7, Colin Yates wrote: Can you not use http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/LinkedBlockingQueue.html? That will provide the blocking element. To execute N (i.e. 10 in your example) use a http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ThreadPoolExecutor.html. The 'glue' would be an infinite loop which .takes from the incoming sequence (which could also be a LBQ) and then puts it on the thread pool. That gets stuff happening in parallel. To consume the results of that stuff in a sequence have a(nother) LBQ which the consumers consume (using the blocking .take) and have the glue code wrap the function it received from the LBQ in a function which takes the result of that function and puts it on the sequence. This looks like (clojure forgiveness is required): [code] (def incoming-queue (javaLinkedBlockingQueue.)) (def outgoing-queue (javaLinkedBlockingQueue.)) (def workers (java... some thread pool/executor.)) ; the following would need to reify itself to be a Runnable, not got that far yet :) (defn execute [job result-queue] (let [result (job)] (.put result-queue result))) (def stop-loop (atom false)) (while (not @stop-loop) (def next (.take incoming-queue)) (execute next outgoing-queue)) [/code] A few caveats/notes: - this uses a lot of Java constructs - that is fine. It is perfectly idiomatic to use the right Clojure or Java constructs. LBQs rock. - the above won't compile and the 'execute' needs to return a Runnable - not sure how. - it ties up a worker thread until the result can be put onto the outgoing LBQ. If the outgoing LBQ is bounded and you don't have enough consumers then eventually all the worker threads will be effectively idle until the results can be consumed. - if you didn't want to use a ThreadPool then you could update 'executor' to maintain an (atom) number of currently executing jobs. The glue code is single threaded so no chance of multiple jobs starting in parallel. The single threaded 'cost' is fine as it is doing nothing other than moving things around. I am a (Clojure) newbie so be warned! I fully look forward to somebody providing a much nicer and more idiomatic Clojure implementation :). Hope this helps. Col On Thursday, 30 May 2013 06:19:29 UTC+1, Artem Boytsov wrote: Hello, folks! I'm a relative noob in Clojure especially when it comes to concurrency, so please forgive my ignorance. I have a processing stage (producer) that feeds to another one (consumer). The producer has a bunch of items to process and it's I/O blocking which takes random time, but the order of the items is insignificant, so ideally they would materialize on the consumer side on the first come first serve basis. I would like to create a blocking lazy sequence I could just give to the consumer. I know how to create a lazy sequence (lazy-seq), or how to make it run in background and block on results (seque), but what I can't wrap my head around is how parallelize the processing the Clojure way. I was considering kicking off multiple agents, but how can I wait for any one of them to finish, not all of them (as await does)? I'm not sure but I think the same goes for futures/promises. I could have multiple agents putting the results into some shared sequence, but then how do I block on the sequence itself? What I'm trying to do can be described in the following way in a silly imperative pseudo-code: workers = new Worker[10] ; initially w.got_data == nil for each x in source_data: w = wait_for_any_worker_ready(workers) ; initially all of them are ready if (w.got_data) output.enqueue(w.data); the consumer will read output in a blocking way w.process(x) ; non-blocking, kicks off in the background Or, another way to describe it, given a seq of integers: [ 1, 2, 3, 4 ... ] and a simple function with a variable delay: (defn process [x] (Thread/sleep (* 1 (rand))) (* 2 x)) How can I write a function which would
Re: iOS and Windows RT support?
Not Clojure, but you can use Nu, a Lisp-like language, to write iPhone applications. http://programming.nu/about https://groups.google.com/d/topic/programming-nu/vboT7iW2ko8/discussion On Tuesday, January 22, 2013 12:55:29 PM UTC-5, MC Andre wrote: What's the state of iOS and Windows RT support for Clojure? It would be awesome to write iPhone and Surface apps in Clojure! Is there a .NET port of Clojure we could use to write Windows 8 Metro apps? -- -- 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.
Job Opportunity - Clojure coder + QA experience
There is an opening in my QA department at Red Hat. Note, the posting below is a somewhat generic and does not mention Clojure, but I can tell you that Clojure is already being used extensively by our group, and that you would be using it regularly. http://jobs.redhat.com/jobs/descriptions/principal-quality-assurance-engineer-cloudforms-system-engine-raleigh-north-carolina-job-1-3484969 The role is Software Engineer in Test, where finding bugs is the top-level goal, but automated tests and tooling are the majority of the work. All the code we work with (including the product, the test tools, and the tests themselves) is open source. Feel free to contact me for further details - jweiss at redhat dotcom -- -- 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, send email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Montreal Clojure user group
For newcomers who might not know, there is a Clojure user group in Montreal and our next meeting is Tuesday January 15th. Details here: http://groups.google.com/group/montreal-clojure-user-group -- 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
Re: Clojure 1.5.0 RC 1
On Sun, Dec 23, 2012 at 7:21 PM, Toby Crawley t...@tcrawley.org wrote: Sean Corfield writes: On Sun, Dec 23, 2012 at 8:50 AM, Peter Taoussanis ptaoussa...@gmail.comwrote: Also `lein swank` appears to be failing on Leiningen 2.0.0-preview10: Exception in thread main java.lang.IllegalArgumentException: No matching ctor found for class clojure.lang.Compiler$CompilerException, compiling:(swank/commands/basic.clj:182:24) Given that swank-clojure is deprecated, this may be the not so subtle push that moves everyone over to nREPL :) IIRC, the problem is that swank constructs that Java class explicitly and its signature has changed to include column number? This has actually been fixed in swank-clojure 1.4.3, but the latest lein-swank (1.4.4) still pulls in swank-clojure 1.4.2. Maybe it's time to release a newer lein-swank - I'll chat with Phil about that. Cool. This is also working for me with clojure 1.5.0-RC1: https://clojars.org/org.clojars.chouser/lein-swank Jeff -- 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
Re: Clojure 1.5.0 RC 1
On Sun, Dec 23, 2012 at 10:21 PM, Toby Crawley t...@tcrawley.org wrote: Jeff Dik writes: This is also working for me with clojure 1.5.0-RC1: https://clojars.org/org.clojars.chouser/lein-swank The change to lein-swank to load the proper swank-clojure is already on master[1] - is chouser's version just a release with that change? No, it was pushed one day before your 1.4.3 changes :-) I think it was just a stopgap for lein-swank not working with clojure 1.5.0-beta1. Looking forward for a new lein-swank release, Jeff -- 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
Re: Who's using Clojure?
I'm asked to log in now to access this page. On Thursday, April 28, 2011 11:03:53 PM UTC-4, Christopher Redinger wrote: We've got a good start to the list going http://dev.clojure.org/display/community/Clojure+Success+Stories Any more we should get listed? -- 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
Re: [ANN] Clojars Releases repository
As a starting point, the gpg website features native installers for both Windows and Mac OS. http://www.gnupg.org -- 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
Re: Cdr car
If I may suggest the following presentation: http://blip.tv/clojure/clojure-for-lisp-programmers-part-1-1319721 http://blip.tv/clojure/clojure-for-lisp-programmers-part-2-1319826 There used to a transcript available on the newsgroup until Google decided to remove all files from newsgroup 8) On Wednesday, October 17, 2012 2:16:01 PM UTC-4, Curtis wrote: Cons seems to be strange How do i use Cons with an atom to make a list? (cons 1 1) -- 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
Re: real-world usage of reducers?
On Tuesday, August 21, 2012 10:49:45 PM UTC-4, Jim foo.bar wrote: If you say that running with reducers cuts runtime to 1/4 the original, I'll believe you...However, even though our code is very similar, I Maybe you two have a different number of cores? One test might be for you to test the scrabbler on your machine, with and without reducers and compare the speed gain. -- 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
assoc! order problem
You are using the map literal, which corresponds to the hash map. Use this if you want a sorted map: http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/sorted-map -- 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
Re: [ANN] geva-clj 1.2 - Grammatical evolution in clojure
Wow, cool. Over the years we've talked about using some kind of grammar constrained evolution to generate synthesizers and musical ideas in Overtone, and this could be just the tool to do that. Would it be possible to perform iterations manually, rather than having to pass the fitness function to geva-run? That way we could create a new generation, generate mp3's based on their output, let people score them, and once all scored request the next generation. Now I need to think about how to define synthesis grammars... -Jeff On Wednesday, July 25, 2012 11:33:34 PM UTC+1, cameron wrote: Grammatical evolution is a form of genetic programming that allows you to search for a program fragment or form that has a high fitness by evolving and testing multiple models across generations. Grammatical evolution differs from traditional genetic programming in that individuals are created from a BNF grammar, this makes it much easier to specify constraints in the solution and adapt the search to new problem domains. geva-clj allows you to evolve clojure programs or drive java based searches written in the GEVA framework. There's a getting started guide available at http://cdorrat.github.com/geva-clj/ The source is on github at http://github.com/cdorrat/geva-clj The GEVA project page with lots of documentation and Java examples is available at http://ncra.ucd.ie/Site/GEVA.html The core library is available on clojars, add the following to your project.clj [org.clojars.cdorrat/geva-core 1.2-SNAPSHOT] Cameron. -- 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
A clojure encounter
Yesterday I was sitting on the tube in London, going home from work. A guy sat down next to me and started reading Clojure in Action. It was a good night. -Jeff -- 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
community interest in machine learning (?)
I could not comment on the community as a whole, but certainly a part of it has interest in it. Here is a presentation about using ML in Clojure for genome research: Hacking the Human Genome Using Clojure and Similarity Search http://bit.ly/yKFnPA Also, an interview with the speaker: http://bit.ly/Ai6ILm -- 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
Printing non-serializable data that can be read back in
I am using clojure for functional testing ('functional' as opposed to unit testing, I don't mean in the FP sense). My tests write a clojure-formatted file containing all the test results. Each result may include: 1) The code of the test 2) Parameters of a data-driven test 3) Trace of a failed test The problem I'm having is when I go to analyze the results, I cannot simply call read on the file, because it's full of non-serializable # ... values, and also #'s and ...s for print-level and print-length being exceeded. Usually those are nested deep in the parameters or the trace. In every case, I don't *need* the missing data, it doesn't need to be truly serializable. An informative placeholder would do fine. I'm not doing computations on the trace, I just like it to be there so I can read it myself to see what what happening. So how do I solve this? I know I can replace the defmethod print-method for java.lang.Object to just print a readable string. That would solve the # ... . What about the #'s from the nesting level being exceeded? Or ... from print-length being exceeded? (I cannot turn off the limits for print-length, since I trace functions that return infinite seq's). Or should I approach it from the other direction, and modify the reader to accept this input somehow? And I suppose on another level I should ask, why isn't a readable placeholder the default behavior? Any suggestions appreciated, Jeff -- 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
Re: reloading protocols causes problems
On Tuesday, June 19, 2012 5:53:41 PM UTC+1, David Nolen wrote: Looking forward to an Overtone API over WebAudio ( http://chromium.googlecode.com/svn/trunk/samples/audio/index.html) :) David This has been discussed briefly, but it would be a serious undertaking to develop something approximating the functionality of the SuperCollider synthesis engine we currently use. That said, our instruments are just functions, so it might be feasible to use a lot of the music making capabilities of Overtone on top of a fresh synthesis layer done using WebAudio... Someday maybe. -Jeff -- 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
Re: reloading protocols causes problems
Sure, but if the protocol hasn't changed, does a new type need to be generated? Maybe this is too much to ask, but I would imagine that the compiler could inspect the current protocol of the same name and compare it with the newly evaluated one, and then only generate a new type when necessary. I don't know how this machinery works currently so this could be a naive or incorrect way of thinking about it, but if possible it would really improve protocols for use in dynamic development. -Jeff On Tuesday, June 19, 2012 3:49:13 PM UTC+1, Phil Hagelberg wrote: Protocols necessarily make some unfortunate dynamicity trade-offs in the name of self-hosting. If you value interactive development over execution efficiency perhaps they are not the right choice. -Phil -- 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
reloading protocols causes problems
Hi, I'm wondering if people might have advice on how to deal with the issue of reloading protocol definitions. Currently in Overtone things break when we reload some namespaces because once a defprotocol form is re-evaluated the existing types that implement that protocol are no longer valid because they refer to the old protocol, even when it hasn't changed. Our current fix is to wrap all protocols in a defonce form, but this isn't the prettiest solution ever. Is it crazy to imagine that protocols could remain the same after a reload unless they have changed, so that this problem would only be caused by actually changing a protocol rather than just re-evaluating a defprotocol form? I don't know enough about the underlying machinery in terms of java class types and compilation to know if this is a reasonable thing to do. Otherwise, maybe there is another way to handle the issue? Thanks, Jeff -- 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
How to do aynchrounous producer/consumer
-- 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
How to do aynchrounous producer/consumer
Java has queues that will do just what you want, as well as thread pools to process the jobs. It's reasonable and idiomatic to use this stuff from Clojure. http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ConcurrentLinkedQueue.html -Jeff -- 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
Re: Clojure Namespace Browser (clj-ns-browser 1.0.0)
Cool, this will be helpful when exploring a new library. It would be nice if the namespace column could optionally use a tree though, rather than expanding everything to a single list. Thanks, Jeff On Apr 5, 6:56 am, Frank Siebenlist frank.siebenl...@gmail.com wrote: I still remember the first time I was introduced to Smalltalk, when my colleague demonstrated the class-browser - it was one of those jaw-dropping moments: all that information at your finger-tips of a live- and living system… Guess nowadays it's more nostalgia than anything else, but in many ways that Smalltalk development environment is still a hard act to follow. Hopefully this Clojure Namespace Browser will get us one small step closer to our ultimate development environment (… although I'm sure that some of you emacs-gurus believe you're already there ;-) ). The graphical browser should give you easier access to the documentation strings of all the vars in your live clojure project, as well as the source code, and clojuredocs' examplescomments. You can get all that info from the repl, but hopefully this browser should make it easier to … browse, explore, and find stuff in Clojure's vast collection of libraries. The installation is dead-simple - just add: :dev-development [[clj-ns-browser1.0.0]] to your project.clj file, start your repl, evaluate (use 'clj-ns-browser.sdoc), and then (sdoc), and your up and running with this namespace browser always one click or (sdoc…) away… Caveat… it all works well on my MacOSX, but I have seen some issues with Lubuntu and missing unloaded namespaces - also I haven't tested it on windoze or other OS-flavors. So you mileage may vary… The code and some more info with some screenshots are available at: https://github.com/franks42/clj-ns-browser Finally, kudos to Dave Ray and his Seesaw - fantastic tool and near real-time support on the mailing list. (this has essentially been a 2 week project after Clojure-Conj/West - an after the kids are asleep project - no experience with Swing… a testament of how good seesaw is as an abstraction tool…) Please let me know if it works for you, and suggestions and feedback are more than welcome. Enjoy, FrankS. -- 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
Re: (constantly)
I wish there was a built-in for this as well. I don't know that (constantly) is a good name for it though. I couldn't think of a good name, apparently a null function means the same as identity function so that doesn't work. On Monday, April 2, 2012 2:39:31 PM UTC-4, Jay Fields wrote: I often tend to define the following in my apps (def no-op (fn [ _])) The other day I noticed constantly ( http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/constantly ), which is basically the same thing - except I would have to say (constantly nil). What do you all think about allowing constantly to take no args and constantly return nil? Or, is there another function that does that and I've just overlooked it? Cheers, Jay -- 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
Re: Source code as metadata
I believe the latest code does capture closures properly. I haven't tested all kinds of crazy corner cases, but it does work for all my closures. From browsing git, it looks like the project.clj version hasn't been incremented in 7 months, and the fix for closures came in after that. If you're using serializable.fn from a maven repo, it is out of date, AFAICT. -jeff On Friday, March 30, 2012 3:07:53 PM UTC-4, Phil Hagelberg wrote: Nathan Matthews nathan.r.matth...@gmail.com writes: I wanted to serialise functions and send them over the network. The problem with serializable-fn is that it doesn't capture closures. It's designed to capture closures; if it doesn't that would be an (unsurprising) bug. -Phil -- 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
Re: 3d modeling tools
If you are going to use processing from Clojure, you'll want to checkout Quil: https://github.com/quil/quil It's a more Clojure friendly take on processing sketches, and it's a lot less painful to get up and running. -Jeff On Mar 19, 4:15 pm, Lee Spector lspec...@hampshire.edu wrote: On Mar 16, 2012, at 10:05 AM, Niels van Klaveren wrote: AFAIK there's not much projects focussing on 3D in Clojure, but you can take a look at processing (http://processing.org) and one of it's Clojure wrappers. It's a great little language for 2D/3D visuals, and there's plenty of swarm-like demos for it (http://openprocessing.org). For 3D calculations, (verlet) physics and more there's the java library toxiclibs (http://toxiclibs.org), whose author is currently porting/wrapping to Clojure. It's not really a cut-and-dried solution, but it's pretty flexible and has a simple API unlike a lot of 3D projects which focus very narrowly on games development. Thanks Niels. I've actually used Processing quite a bit -- even taught a couple of courses with it -- and I've played a little with the Processing library via Clojure. I'll have to look into that again in this context. I recall some frustration with Clojure+Processing which I think stemmed from (1) feeling trapped in the applet context, (2) not knowing how to run programs that use the library on nodes without graphic displays (from which I would dump data to files -- I do lots of runs on cluster nodes to collect data), and (3) not knowing how to get Processing-based projects to take advantage of multiple cores. If you or anyone else has comments related to these issues then I would love to hear them. The toxiclibs library also looks quite interesting. Do you know of any examples that show this being invoked from Clojure? -Lee -- 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
Re: clojure.io
Whats more, the VM I/O abstraction is already hiding details of its underlying platforms. Having another I/O abstraction across multiple VMs sounds like the Fantom Programming Language approach which pushes a unique API across different VM implementations. AFAIK the Clojure approach is more about accessing more low-level parts of the implementing VM with interop typical to the platform. That being said I would not trade slurp/spit for direct java.io access, for example. I'm afraid I'm expressing myself awkwardly. On Mar 9, 9:42 am, Stuart Sierra the.stuart.sie...@gmail.com wrote: Possible to do I/O without any interop ever being called? No. Possible to define a standard I/O abstraction that hides the details of the underlying VM? Yes. But difficult. I/O is a leaky abstraction at the best of times. -S -- 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
Re: Pretty print defn
I use serializable.fn pretty extensively, and it's been working great for me. I think at this point, the only fix I put in that Phil didn't is that my serialized fn's print with an unqualified fn symbol, instead of serializable.fn/fn. I did that so it's more readable, the tradeoff is that if you want your fn's to be re-serializable (which I don't think you do), you have to spell out which fn you're using. https://github.com/weissjeffm/serializable-fn Another caveat is that it does not work with defn, just fn. So you would have to do (def qw (fn [] (inc 2)) A serializable.fn/defn would be really nice to have, I am not sure how difficult it would be to write, without having tried it. -jeff On Friday, March 2, 2012 10:19:56 PM UTC-5, Phil Hagelberg wrote: Mark Rathwell mark.rathw...@gmail.com writes: (clojure.repl/source-fn 'qw) will give you the source. You can also use serializable-fn to create a function that will carry its source around with it in metadata: https://github.com/technomancy/serializable-fn But it's not very well tested. -Phil -- 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
Re: Can Clojure be as readable as Python or Ruby ?
I think readable is in the eye of the beholder. I've only moderate experience with Clojure, but the following example from Open Dylan made me realize I really do prefer a concise representation over what is considered easier to read. http://opendylan.org/documentation/intro-dylan/why-dylan.html#functional-languages define method shoe-size (person :: string) if (person = Larry) 14 else 11 end if end method; Versus http://opendylan.org/documentation/intro-dylan/why-dylan.html#algebraic-infix-syntax (define (shoe-size person) (if (equal? person Joe) 14 11)) Albeit my preference could be different over a different example. Silly humans 8) The thing is, if you just keep using Clojure or another Lisp for a little while, you'll probably get used to it and find it comfortable. -- 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
Re: Bret Victor's live editable game in ClojureScript
On Feb 28, 11:13 am, Bost rostislav.svob...@gmail.com wrote: Great work Chris but I think you missed exactly the most important point of Victor's talk. It's about being modeless! Indeed, Chris work is pretty slick. Although I would say the most important point of the talk is that you can, if you choose to, find your own concrete guiding principle to better the world. Victor's demos and no modes were just examples of guiding principles. -- 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
Re: Clojure for Cocoa
I know it's not a Clojure variant, but you might be interested in Nu, an object-oriented Lisp I read about on Disclojure which targets Objective-C. http://programming.nu/index -- 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
Re: How to loop over several sequences in parallel for side-effects?
Shameless plug: If you want to do this type of iteration efficiently, try my library at https://github.com/jpalmucci/clj-iterate user (iter {for x in '(1 2 3)} {for y in '(a b c)} (println x y)) 1 a 2 b 3 c nil user Expands into a fast loop/recur form. No intermediate data structures On Jan 20, 2012, at 8:18 AM, joachim wrote: Hi All, Here is a simple problem for which I nevertheless can't seem to find the right solution: How to run over several sequences in parallel for side-effects? Here is one way: (dorun (map some-fn-with-side-effects sequence-1 sequence-2)) However, I was told that the form (dorun (map ... )) indicates that doseq should be used instead because it is faster, and I can use speed. I think that this is not possible however because doseq only allows to loop over a single sequence at a time? I was wondering what is the idiomatic clojure way in this case? Thanks! Jm. -- 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 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
Re: clojure clr files ?????
On Fri, Jan 13, 2012 at 6:41 PM, s...@ida.net wrote: When I run leiningen , I can execute lein within any folder. For instance I have a folder c:\projects, i run lein new abc. I then have a folder abc that is created ,and all the projects files are stored within folder abc. As far as I can know, Leiningen won't really be of use for ClojureCLR projects. It's a tool for Clojure on the JVM. I installed clojure clr in a folder clr. I can run clojure.main.exe located in c:\clr\ Do have to create ui.clj in the same folder as is clr ? No, you can put ui.clj anywhere. I thought i would have a place that is designated for clojureclr Do I set clr in my path: so I can execute from within any folder? No, you can call Clojure.Main.exe with an absolute path if you want. However, adding the directory to your PATH environment variable is often more convenient, so that you only have to type Clojure.Main.exe instead of the full path to Clojure.Main.exe. Hope this helps, Jeff - Original Message - From: Jeff Dik s45...@gmail.com To: clojure@googlegroups.com Sent: Friday, January 13, 2012 2:43 PM Subject: Re: clojure clr files ? On Fri, Jan 13, 2012 at 2:21 PM, jayvandal s...@ida.net wrote: I have installed clr in a folder called clr and have net installed. I can click on main exe and get the clr to give me a repl . When I get ready to create the ui. file in the example where am i storing files In leiningen i create a folder for the project all the files are stored in the project folder. In creating a UI with Windows Forms, do i have other files I don't really understand the question, but perhaps this helps? http://www.myclojureadventure.com/2012/01/intro-to-clojure-clr-creating-ui-with.html -- 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 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 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
Re: clojure clr files ?????
On Fri, Jan 13, 2012 at 2:21 PM, jayvandal s...@ida.net wrote: I have installed clr in a folder called clr and have net installed. I can click on main exe and get the clr to give me a repl . When I get ready to create the ui. file in the example where am i storing files In leiningen i create a folder for the project all the files are stored in the project folder. In creating a UI with Windows Forms, do i have other files I don't really understand the question, but perhaps this helps? http://www.myclojureadventure.com/2012/01/intro-to-clojure-clr-creating-ui-with.html -- 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
Re: question from wikibooks page on macros?
You are right. Keep reading a bit and it says But as we defined pointless above, it is just a regular function, not a macro. And you can verify the pointless macro using macro-expand as shown later.(macroexpand '(pointless (+ 3 5)))= (+ 3 5) On Jan 6, 11:12 am, Andrew ache...@gmail.com wrote: http://en.wikibooks.org/wiki/Learning_Clojure/Macros The page says the following: (def pointless (fn [n] n)) Whatever is passed to this macro---a list, a symbol, whatever---will be returned unmolested and then evaluated after the call. Effectively, calling this macro is pointless: (pointless (+ 3 5)) ; pointless returns the list (+ 3 5), which is then evaluated in its place(+ 3 5) ; may as well just write this instead But actually, doesn't (+ 3 5) get evaluated *before *pointless ever sees it? Or am I mistaken? -- 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
Re: Distributed transactions
Immutant is going to have distributed (XA) transactions. The're furiously working on it 8) http://immutant.org/ On Dec 31, 11:26 am, Michael Jaaka michael.ja...@googlemail.com wrote: Is there any attempt to make distributed transactions? The usage scenario is the same like in JEE apps. I mean, there is a web service call, the transaction is started, there are some changes to db, some jms sends and when there is no failure all is commited. Maybe someone is already using glassfish or spring from clojure? Some reference to github? -- 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
ClojureScript deftype and extend-type differ
Hello all, I ran into an extend-type issue with the ClojureScript compiler output. If there's a better place to report such things, please point me there. If I define a protocol method with multiple arities, implementing it using deftype works as expected, however extend-type does not. The former compiles to a single javascript function, which checks argument length to handle arity. The latter produces two identically named functions, the second of which overwrites the first; hence only one arity is available at runtime. Here's a simplified example. Given a protocol: (defprotocol MyProtocol (something [this] [this x])) I would expect the following two code snippets to compile with functional equivalence. (deftype MyType [] MyProtocol (something [this] ... ) (something [this x] ... )) (deftype MyType []) (extend-type MyType MyProtocol (something [this] ... ) (something [this x] ... )) The former compiles 'something' to a single function. The latter compiles as: myns.MyType.prototype.myns$MyProtocol$ = true; myns.MyType.prototype.myns$MyProtocol$something = function(this$) { ... }; myns.MyType.prototype.myns$MyProtocol$something = function(this$, x) { ... }; -- 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
Re: ClojureScript deftype and extend-type differ
Issue opened: http://dev.clojure.org/jira/browse/CLJS-104. Cheers, Jeff -- 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
Re: ClojureScript deftype and extend-type differ
Hi Alan, Good catch. This raises a question though: why do deftype and extend-type take subtly different forms for methods with multiple arities? ;; deftype only works like this: (foo [this] 1) (foo [this x] 2) ;; extend-type only works like this: (foo ([this] 1) ([this x] 2)) This seems a bit odd to me. Though for the record, both the clojure and clojurescript compilers behave the same, so there's no bug. I'll make a note on the JIRA ticket. Cheers, Jeff -- 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
Re: Probabilistic programming in clojure
Cool! I experimented a little bit with Church a while back, but having something like this in Clojure could be really interesting. I don't have much experience with sampling, but if I understand it correctly, your grass-is-wet demo is defining a belief network where each sample taken represents the complete state of the graph, or just the final outcome? What does a sample look like? It would be great if we could use this kind of generative model to create chord sequences, melodies, and rhythms for Overtone. I don't know what kinds of choice points would be appropriate, or if we could train them based on a database of existing progressions? -Jeff On Nov 18, 12:57 am, Nils Bertschinger nils.bertschin...@googlemail.com wrote: Hi everyone, inspired by the bher compiler for the probabilistic scheme dialect MIT Church, I have implemented a version of the probability monad which uses Metropolis Hastings to draw samples from runs of monadic programs. You can find the code on github:https://github.com/bertschi/ProbClojureNice. The monadic version is more a proof of principle and not very fast. It might nevertheless be useful, e.g. for educational purposes. Have a look and decide for yourself ... For the future, I'm working on a different approach to embed probabilistic operations into clojure which scales better and allows to run somewhat larger models. Any comments and feedback are welcome. Best, Nils -- 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
Re: Homoiconicity in clojure (macro power)
This is the explanation that really made it click for me: The nature of Lisp http://www.defmacro.org/ramblings/lisp.html -- 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
Re: How to convert general recursion to loop .. recur syntax
In general, you can't convert recursion into loops. Recursion has stack frames, loops don't. I can't really tell what you are trying to do here because your example just walks the interior nodes of the expression tree, doing nothing. Can you clarify with a more complete example? -- 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
Re: new Getting Started page
I like the new page, and I do think Clooj is filling a much needed (or at least much wanted) space for beginners to both Clojure and Java, especially for those who have been accustomed to the practical IDLE while learning Python. I'm reasonably experienced in both Java Clojure, and I use the Eclipse plugin at work, but I find it useful to Clooj on my netbook while commuting or at home. Clooj is portable Clojure 8) P.S. + 1 on the name -- 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
Re: Stanford AI Class
They will also be available to be taken as an online class with grading as the AI introduction class. Links are on the main introduction to AI page - http://www.ai-class.com/ : http://www.db-class.com/ http://www.ml-class.com/ See also Stanford Engineering Everywhere where past lectures and material of several other courses are available for free: http://see.stanford.edu/ On Aug 16, 12:21 pm, daly d...@axiom-developer.org wrote: Ng's course on machine learning is online. I've already taken it. You need a background in probability. -- 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
Re: Stanford AI Class
I think we all agree that Lisp would be ideal for AI, given a medium or long-term exposure, but for an introductory class to varied branches of AI, we could do worse than Python, an easy to read language with various numerical and AI libraries (PyEvolve, for example. http://pyevolve.sourceforge.net/0_6rc1/). And it's dead simple to start using it with IDLE or the REPL. After all, the class is not about teaching Python or Lisp, it's about teaching AI concepts. Even Java has been used this gentle introduction to genetic programming: http://www.gp-field-guide.org.uk/. In fact, it might be even better to start with a no-brainer language like Python. Also if I may digress a bit, we have a tendency to forget that what works for us best might not be what works best for other. Lisp simply is not for everybody, maybe not even for most people, and that's ok. On Aug 13, 1:36 pm, Lee Spector lspec...@hampshire.edu wrote: On the other hand I prefer to work in Lisp (Common Lisp, Scheme, Clojure), but my main project these days involves evolving Push programs rather than Lisp programs, for a bunch of reasons related to evolvability -- seehttp://hampshire.edu/lspector/push.htmlif you really want to know. I prefer to work in Lisps because they make it simpler to write code that manipulates program-like structures (however they end up being executed) and because I like Lisps better than most other languages for a slew of other reasons. But my evolved code is executed on a Push interpreter implemented in the host language and there are Push-based GP systems in many languages (C++, Java, Javascript, Python, several Lisps). The language choice really just affects software engineering and workflow issues, not the fundamental power of the system to evolve/learn. -- 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
Re: timed termination of iterative algorithm
http://github.com/jpalmucci/clj-return-from On Jul 31, 12:41 pm, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: Hi Ken, thank you for your response. Do you think you can give me a quick example of how to extend an Exception to be able to extract the value from the exception when it is caught.. Should I be using gen-class for this? (seems quiet messy to me)... do you have a better suggestion.. Thanks, Sunil. On Sun, Jul 31, 2011 at 7:59 PM, Ken Wesson kwess...@gmail.com wrote: On Sun, Jul 31, 2011 at 10:25 AM, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: Hello everybody, I would like to have a long running process to return its current solution after some pre-determined amount of time. It so happens that the iteration is happening at a deeper nested function. I would like to have a way to return from this nested function when its time ... How can I do this. Currently I am considering using the throw catch mechanism to do the job. Is there a better way of doing things like this .. . I basically would like to have a non-local return .. something like the common-lisps return-from .. I found return-from equivalent in clojure.. I was hoping there is a nicer way to deal with this when the function calls are quiet deeply nested.. Probably the least messy way to deal with it is to sprinkle (Thread/sleep 0)s through the innermost loops of the algorithm, one in each, and the outermost loop that refines the in-progress result has a try ... catch for InterruptedException that handles it by returning the current approximation. Then have a separate threat that calls interrupt on the calculational thread on a timer, or if a user clicks a Cancel button on a progress dialog, or whatever. This is more or less what InterruptedException is for; and breaking out of an algorithm in an unusual way is the kind of job for which exceptions are well suited, as well as returning from fairly deep up to a specific handler. -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp REPL. This is the language of a true hacker. Not as clumsy or random as C++; a language for a more civilized age. -- 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 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
Re: ClojureScript Presentation - video
I've subscribe to the Blip.tv itunes feed and it makes it really easy to download the blip.tv videos in iTunes and transfer them to iPod/ iPad. You can search for Clojure on the iTunes store Podcasts section and subscribe. Or you can go in iTunes Advances Menu / Subscribe to Podcast and use this link: http://blip.tv/clojure/rss/itunes On Jul 26, 12:01 pm, Olek aleksander.nas...@gmail.com wrote: Agree, the same for ipod/ipad devs. Youtube is defacto standard for contet publishing, due to wide support. -- 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
Re: protocols and records -- use when?
Thanks for the clarification. I see I was mixing up various concepts in my head. On Jul 29, 8:19 am, Alex Osborne a...@meshy.org wrote: Clojure has some of those features, but it is sufficiently different from the traditional model that I would consider not particularly OO a valid, if not particularly useful description. There are certainly similarities though, after all Clojure tries to solve similar problems. -- 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
Re: Good book on migrating from (Java) OO to FP
In the vein of FP for Java programmers, these two libraries might be of interest. Sequence-like operations on collection using annotations. Nice and small. http://jedi.codehaus.org/ More advanced and Scalaish. Benefits from a bigger community. http://functionaljava.org/ -- 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
Online videos of Montreal Clojure User Group presentations
Some presentations of the Montreal Clojure User Group are now online. http://vimeo.com/groups/bonjure/videos -- 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
Re: protocols and records -- use when?
I'm puzzled when we say that Clojure is not particularly OO, but using protocols and datatypes feel OO to me, except that the namespace of the protocol method implementations is decoupled from the namespace of the type. Perhaps my definition of OO is too loose and I should think of protocols as just abstraction polymorphism. -- 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
Re: dynamically generated let bindings
I don't think it's very typical to pass a form to a function, unless you plan on using eval at runtime. If it doesn't need to happen at runtime, then you'd do this with a macro approximately like this: user= (defmacro bar [f] `(fn [ args#] (let [~'size (count args#)] ~f))) #'user/bar user= (bar (+ size 10)) #user$eval675$fn__676 user$eval675$fn__676@11b4c2 user= (*1 1 2 3 4) 14 ~Jeff On Jul 28, 6:48 pm, Sam Aaron samaa...@gmail.com wrote: Hi there, I'm trying to create a fn which does the following: * returns a fn which takes an arbitrary number of args * calls a helper fn, passing the incoming args returning a vector of alternating symbols and vals * creates a let form using the vector of alternating symbols and vals returned by the helper fn as the bindings * contains some inner form that makes use of the bindings i.e. is it possible to implement something that allows the following to work: (defn binding-vec [args] ['size (count args)]) (defn mk-dynamically-bound-fn [form] ;; returns a fn with sign [ args] which ;; uses binding-vec to create a the vec for ;; which a let statement binds around form ) (def a (mk-dynamically-bound-fn '(+ size 10))) (a 1 2 3 4) ;= 14 (the number of args + 10) Please let me know if I'm being a bit crazy with the question. It's totally possible that I'm barking up the wrong tree with this line of enquiry. Sam ---http://sam.aaron.name -- 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
Re: The Last Programming Language
On Tue, Jul 19, 2011 at 9:04 PM, daly d...@axiom-developer.org wrote: On Tue, 2011-07-19 at 20:14 -0400, Adam Richardson wrote: On Tue, Jul 19, 2011 at 6:23 PM, Brian Hurt bhur...@gmail.com wrote: What's this awk-a-mel he speaks of? Ocaml, pronounced oh-camel, I know very well, but I've never heard of this awk-a-mel. :-) Seriously, his pronunciation of ocaml highlights, I think, the core problem of his talk. There has been significant development in languages, just not in the popular languages. It's been over there in the fringe languages. I will confess that as I listened to the presentation (when I got the email with Tim's link, I just started the video while I was working on some drudgery), I felt like he missed some of the language features promoted in functional languages. He worded functional programming contributions in terms of advancing the idea of limiting/protecting variable assignment (immutability), and to me, that's missing the points of first class functions (which, in light of what he says OOP languages brought to the table, actually provided protected function pointers through purely functional languages without any need for OOP) and an emphasis on function purity and limiting the scope of unpure functions (to me, this goes beyond merely protecting assignment.) These omissions, coupled with the mispronunciations of functional programming language names, and the value placed on the last language being homoiconic (without much justification) had me wondering how much he actually has used languages such as OCaml or Haskell. Homoiconic representation is fundamentally important and lacking in other languages. The programs == data idea is what makes the macro facility work, allows dynamic program construction, compile to core, etc. There is a story going around that McCarthy attended a python talk where they made the claim that python IS a lisp-like language. John pointed out that if it lacks homoiconicity it cannot be a lisp. (I probably have the details wrong). Perhaps the last 6 or 7 paragraphs to http://smuglispweeny.blogspot.com/2008/02/ooh-ooh-my-turn-why-lisp.html? Jeff OCaml came from ML but the ideas came before either one. Lisp supported functional programming long before either language. I believe the point Robert was trying to make was that very few languages have increased our stock of fundamental ideas. OCaml is not one of them. Indeed languages (like Spad) built on lisp STILL support ideas I have not seen anywhere else (e.g. dispatching on the return type as well as the argument types). Robert suggests that we need to develop a standard language. Good luck with that. I participated in the reviews of the X3J13 Common Lisp standard (behind the scenes by passing on my comments and markups to people who had the proposal directly). Trying to define a standard programming language would be the ultimate language war. It has been tried several times before (PL/I included everything and C++0x is trying hard to include everything). At best I believe we will muddle along and I will continue to be rejected during job interviews for working in python 2.7 and not knowing python 3.0. Forty years of lisp programming just makes me too old to hire for any real programming job. Heck, I probably don't know the difference between OCaml and awk-a-mel so I clearly cannot program. :-) I don't need to know how many digits somebody can recite Pi to, but I would like to know how his experience with awk-a-mel lead him to believe that functional programming comes down to protecting variable assignment :) That all said, if Clojure is the seed for the last language, I'd be a happy man. I believe that Robert missed the fundamental point though. It is NOT just the space of ideas that makes lisp the right language. Another key reason is impedance matching. (An impedance mismatch is when you hook a soda straw to a firehose). Programs exist to bridge the gap between the idea domain and the machine domain. Some languages are close to the machine, like assembler, so you have to carry your idea all the way to the machine. Some languages are close to the problem (e.g. Mathematica) but the compiler has to cross the gap to the machine. This is where the ability to create domain-specific languages in the same syntax matters. Lisp is the only language I know that allows you to work across the whole spectrum in a single language. It is possible to say (integrate (car x)) which takes the 0 displacement off the x pointer (machine) and then does a mathematical integration routine (problem) and does it all with the same syntax and semantics. I wouldn't worry that we will stop creating new languages. We have yet to explore the space of unicode replacements for the semi-colon (although Fortress is starting). Kanji semi-colons. I can't
Re: Clojure Books
There is also this nice online introduction for absolute beginners to Clojure and Lisp: Guide to Programming in Clojure for Beginners http://blackstag.com/blog.posting?id=5 -- 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
Re: Integrating Clojure-CLR w/ VS
Sean, It looks like your not alone, see this https://github.com/jmis/vsClojure/issues/33 I was able to launch an exe outside of VS by adding the following environment variable - name: clojure.load.path value: %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\jmis\vsClojure\1.1.0\Runtimes\1.2.0 Jeff -- 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
Re: Radically simplified Emacs and SLIME setup
Phil, This works for me! Thanks! Jeff On Sun, Jun 12, 2011 at 7:51 PM, Phil Hagelberg p...@hagelb.org wrote: On Jun 12, 10:58 am, Mark Engelberg mark.engelb...@gmail.com wrote: I take that back (I had edited the wrong file, which wasn't the one my emacs was using). I get the error Not enough arguments for format string. Oops; I forgot to mention it also needs this: (defvar clojure-swank-command lein jack-in %s ) to replace the old clojure-swank-command defvar. -Phil -- 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 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
Re: Radically simplified Emacs and SLIME setup
Mark, I got this same error when I copied and pasted the clojure-jack-in function from gmail. I had to remove newlines from (search-backward slime-load-hook) and (slime-connect localhost clojure-swank-port) Hope that helps, Jeff On Sun, Jun 12, 2011 at 8:50 PM, Mark Engelberg mark.engelb...@gmail.com wrote: error in process filter: Search failed: slime-load-hook On Sun, Jun 12, 2011 at 4:51 PM, Phil Hagelberg p...@hagelb.org wrote: On Jun 12, 10:58 am, Mark Engelberg mark.engelb...@gmail.com wrote: I take that back (I had edited the wrong file, which wasn't the one my emacs was using). I get the error Not enough arguments for format string. Oops; I forgot to mention it also needs this: (defvar clojure-swank-command lein jack-in %s ) to replace the old clojure-swank-command defvar. -Phil -- 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 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 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
Filter map collection by list of keys
Given the following collection as input (def input ({:a a, :b b} {:b b, :c c} {:d d, :e e})) I want to be able to return a subset of the contained maps for each map that contains at least one key from a list of provided keys. for example: (filter-keys input [:a :b]) ;; out - ({:a a, :b b} {:b b, :c c})) (filter-keys input [:e f]) ;; out - ({:d d, :e e}) Here is how I implemented this: VERSION 1 (defn filter-keys [coll kset] (letfn [(keys-found [m] (- m keys set (clojure.set/intersection kset))) (any-keys-found? [m] ( 0 (count (keys-found m] (filter any-keys-found? coll))) VERSION 2 (defn filter-keys [coll keyseq] (letfn [(any-keys-found? [m] ( 0 (count (select-keys m keyseq] (filter any-keys-found? coll))) VERSION 3 ?? Is there something in clojure core or contrib that would make this easier? -- 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
Re: Filter map collection by list of keys
Wonderful! Pretty cool how the map itself is the predicate to the some function. Thanks Sean! -- 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
Re: Radically simplified Emacs and SLIME setup
On Wed, Jun 8, 2011 at 8:36 PM, Mark Engelberg mark.engelb...@gmail.com wrote: It's been a couple of weeks, so I thought I'd check in and see whether anyone has yet been successful at using the new clojure-jack-in process on Windows. Did the 1.9.2 release successfully resolve the cannot find the path specified error for anyone else? With clojure-mode 1.9.2 and (GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) of 2009-07-30 on SOFT-MJASON) (according to emacs-version), I had to change a s-exp on line 848 in clojure-mode.el from (expand-file-name clojure-root) to (replace-regexp-in-string / (expand-file-name clojure-root) t) and that resolved the cannot find the path specified error for me. Many thanks to Phil all for their work on this! Hope that helps, Jeff Thanks, Mark On Mon, May 30, 2011 at 3:10 PM, Mark Engelberg mark.engelb...@gmail.com wrote: The package installer saw the 1.9.2 release, which I installed. I'm still getting the cannot find the path specified error though. Thanks for all the help you all have provided so far; let me know if you have any other ideas for me to try. Thanks, Mark -- 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 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