Re: core.async buffered channel behavior
I guess the interrupt doesn't really obliterate the fourth put attempt, and that put proceeds in background when you first take. On Wednesday, June 27, 2018 at 5:12:45 AM UTC+10, jonah wrote: > > Hi folks, > > It's been a while since I've used core.async. Documentation suggests that > > (chan n) > > where n is a number creates a fixed size channel buffer supporting n > elements. > > The below clj repl session seems to indicate that I can put 4 items into a > 3-sized buffer: > > user=> (def c (async/chan 3)) > #'user/c > user=> (async/>!! c :a) > true > user=> (async/>!! c :b) > true > user=> (async/>!! c :c) > true > user=> (async/>!! c :d) > ;; correctly blocks, ctrl-c to break > user=> (async/ :a > user=> (async/ :b > user=> (async/ :c > ;; why do i get :d ? shouldn't it block? > user=> (async/ :d > > This is with: > > [org.clojure/core.async "0.4.474"] > > Thanks, > > Jonah > > > -- 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: off-topic: stackof developer survey
Yes, if you have a 'product' perspective, but others will have a service provider perspective and would like to see employers committed to Clojure and looking to engage with practitioners.+ On Sunday, March 26, 2017 at 4:49:45 AM UTC+11, Dragan Djuric wrote: > > > Isn't it advantageous in some sense to have access to stuff that your > competition doesn't have? > > On Friday, March 24, 2017 at 11:05:24 PM UTC+1, piast...@gmail.com wrote: >> >> >> >> > This did get me thinking though. If the community *did* want to score >> highly >> > on some of these metrics, what would those be? >> >> I'll be happy so long as Clojure is the popular choice for doing the >> things where it's advantages should matter: machine learning, AI, NLP, >> concurrent programming. >> >> It drives me crazy that Python is doing so well in all of the areas where >> Clojure should be winning. There are such beautiful libraries for working >> with vectors and matrices with Clojure, which should obviously help with >> NLP, yet people use Python instead. Likewise, so much of machine learning >> should be done as work in parallel, and Clojure makes that easy, yet Python >> is preferred. Drives me crazy. >> >> These last few years I've been at a lot of NLP startups, and the choice >> of Python makes me sad. >> >> >> >> >> On Wednesday, March 22, 2017 at 7:17:10 PM UTC-4, Luke Burton wrote: >>> >>> >>> On Mar 22, 2017, at 2:26 PM, Gregg Reynoldswrote: >>> >>> very interesting stuff, esp. the sociological bits: >>> >>> http://stackoverflow.com/insights/survey/2017 >>> >>> sadly, clojure does not even rank in popularity. but it's number 1 in >>> pay worldwide. o sweet vengeance! >>> >>> >>> Some fun reading in there, Clojure features a couple of times. It would >>> be fun to watch for spikes in traffic to Clojure related resources, because >>> I'm sure that landing "most highly paid" will cause a few people to sit up >>> and take notice. >>> >>> This did get me thinking though. If the community *did* want to score >>> highly on some of these metrics, what would those be? Or do none of them >>> adequately capture what is valued by the Clojure community? >>> >>> I think I'd claim that popularity is a terrible metric, even though it >>> can be gratifying to be popular. The fact that lots of people do a >>> particular thing doesn't mean that thing is inherently good, or worth >>> striving for. Some very popular things are bad lifestyle choices, like >>> smoking, a diet high in sugary foods, and writing JavaScript. >>> >>> Conversely some very, very good things can die from even the perception >>> of being unpopular. We often get people asking on the subreddit why they >>> find so many "abandoned" libraries in Clojure. The fact a piece of software >>> might have been written years ago, and still be perfectly usable, is such >>> an anomaly in more "popular" languages that people assume we've all curled >>> up and died. I recently had a project steered away from Clojure (suffice to >>> say it was a very good fit, I thought) due to concerns around the >>> availability of Clojure programmers in the long term. In Silicon Valley. >>> Where you can throw a rock in the air and be certain it will hit a >>> programmer on the way down. >>> >>> Anyway, my personal metric for Clojure success would be: "for projects >>> where Clojure is an appropriate technical fit, how often are you able to >>> choose Clojure?" It's a selfish metric but the higher it goes, the happier >>> I am ;) >>> >>> Luke. >>> >> -- 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: Reader macro not ignoring form?
Many thanks Alex. Craig -- 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.
Reader macro not ignoring form?
nREPL server started on port 37885 on host 127.0.0.1 - nrepl://127.0.0.1:37885 REPL-y 0.3.7, nREPL 0.2.12 Clojure 1.9.0-alpha11 OpenJDK 64-Bit Server VM 1.8.0_91-8u91-b14-0ubuntu4~14.04-b14 Docs: (doc function-name-here) (find-doc "part-of-name-here") Source: (source function-name-here) Javadoc: (javadoc java-object-or-class-here) Exit: Control+D or (exit) or (quit) Results: Stored in vars *1, *2, *3, an exception in *e user=> (::foo/bar {}) RuntimeException Invalid token: ::foo/bar clojure.lang.Util.runtimeException (Util.java:221) RuntimeException Unmatched delimiter: ) clojure.lang.Util.runtimeException (Util.java:221) user=> #_(::foo/bar {}) {} user=> but: nREPL server started on port 39659 on host 127.0.0.1 - nrepl://127.0.0.1:39659 REPL-y 0.3.7, nREPL 0.2.12 Clojure 1.9.0-alpha11 OpenJDK 64-Bit Server VM 1.8.0_91-8u91-b14-0ubuntu4~14.04-b14 Docs: (doc function-name-here) (find-doc "part-of-name-here") Source: (source function-name-here) Javadoc: (javadoc java-object-or-class-here) Exit: Control+D or (exit) or (quit) Results: Stored in vars *1, *2, *3, an exception in *e user=> #_(::foo/bar {}) user=> Craig -- 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: clj-time/do-at not workin as expected
Chime? -- 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: 2 way transform in single definition ? unification ?
You may have already discounted Java versions, but just in case ... http://www.javacodegeeks.com/2013/10/java-object-to-object-mapper.html Craig On Monday, July 13, 2015 at 3:53:19 AM UTC+10, Jules wrote: Guys, I have an external and an internal data representation. I need to define transforms both ways. Both models are structured. A pair of in/out functions might look like: (fn [{{b :b c c:} :a}] [b [c]]) (fn [[b [c]] {:a {:b b :c c}}) I just typed that OTTOMH so please forgive any mistakes. I have about 50 of these to define and maintain and I may have further representations to map to in the future. My question - Is there a library that will allow me to define the relationship between the two representations declaratively and then generate the transform functions from that single src. Ideally it would allow me to extend it to construct/destructure e.g. joda-time class instances etc as some of my internal rep uses these. It feels a bit like unification in PROLOG... Looking forward to hearing your ideas. regards, Jules -- 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] Clojure 1.7.0-alpha3 now available
I hit this error when moving to a new box that had an encrypted FS. Might be related to your case as well. Good luck. On Wednesday, October 29, 2014 1:34:28 AM UTC+11, Stefan Kamphausen wrote: Hi, have there been any changes how fns with a name and recursion are compiled? One of my projects has a function which does not compile with 1.7.0-alpha3 anymore, but did fine with 1.6.0. I tried to create a minimal example at https://github.com/ska2342/nested-fn-breaks-clojure-17 (I know the function itself is probably stupid, I just wanted to demonstrate the case. I don't know if it even runs.) Compilation breaks with a java.io.IOException: File name too long The problem seems to be the combination of * using a long function name (not a bad thing per se), * using a rather long name for a local binding (not common in Clojure-land, used in my case for documentation of the intent of the anon fn), * and using a name for the anonymous function (needed for recursion and usually a good idea because it improves stacktraces, but maybe you added the local binding to the name for exactly that reason). Regarding the second (long var binding name), my original function uses shorter names, but has some nested constructs (for, cond, ...) which seem to make the name larger, too. There is really nothing unusually long there. Of course, I can work around this by using different names, factoring an inner anon function out to a defn and probably in other ways. I just wanted to make sure, that you are aware that problems like this may show up and made the change on purpose. Thanks, stefan -- 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: The Last Programming Language
Maybe. Or maybe Martin's talk should be entitled The Last Programming Language To Get Any Mind-Share. On Jul 19, 3:42 am, Steven Tomcavage ste...@tomcavage.com wrote: I double we'll ever see The Last Programming Language, because we're all hackers and we all have a notion that things could be done better if we just tweaked this or that a bit, and voila, you have a new programming language. On Mon, Jul 18, 2011 at 1:36 PM, TimDaly d...@axiom-developer.org wrote: Robert Martin argues that Clojure could be the seed of the last programming language. http://skillsmatter.com/podcast/agile-testing/bobs-last-language -- 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: Declarative Data Models
On May 2, 8:37 pm, David Jagoe davidja...@gmail.com wrote: (i) Is it possible to generate the (defrecord Person ...) from the person-entity hash-map that I have shown? Sure. You may want to have a look at https://gist.github.com/876029 (and associated post to this group) for something somewhat related. (ii) Is this a totally crazy idea? I don't think so. The ability to have a model/schema that can be used to build forms, codecs and DDL statements etc would be useful to others I imagine. Such a mechanism could be used, for example, as input into Lobos. (iii) Am I neglecting to see a much simpler way of achieving my core objective (reduce all of the duplication)? If so, you and me both. Regards, Craig -- 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