tools.namespace ns parsing

2014-12-14 Thread Petr
Hello. I stumbled on a problem that caused me fair amount of frustration and I suspect that it could affect other users who start using tools.namespace. The problem is that clojure.code/ns macro is more lenient than what follows from it’s documentation. For example ‘use’ (or require) cla

Is there a reason ns macro is not a function?

2014-12-30 Thread Petr
Hello. Does anyone know why clojure.core/ns macro is not implemented as function? It seems that it should work that way except that probably it would be nicer to have in-ns call at the top level. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To

[ANN] Compost 0.2 - replacement for stuartsierra/component

2017-02-14 Thread Petr
ation was to have means to declare lighter ad-hoc components which I often need. See also README.md for more details. -- Petr -- 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

Re: [ANN] core.async 0.3.426

2017-02-23 Thread Petr
I have slightly unrelated question. Why core.async is still not 1.x version? Is there a feeling that API is still experimental and not mature enough? Or authors of core.async are not happy with implementation? среда, 22 февраля 2017 г., 19:47:33 UTC+1 пользователь Alex Miller написал: > > core.a

Derefs broken after clojure.tools.namespace.repl/refresh

2017-04-10 Thread Petr
What happens here? > (send-off (agent {}) (fn [_] (clojure.tools.namespace.repl/refresh))) > @(atom {}) => {} > (def s (atom {})) => #'user/s > s => #object[clojure.lang.Atom 0x5f6a0fab {:status :ready, :val {}}] > @s => ClassCastException clojure.lang.Var$Unbound cannot be cast

Re: Derefs broken after clojure.tools.namespace.repl/refresh

2017-04-11 Thread Petr
понедельник, 10 апреля 2017 г., 22:56:43 UTC+2 пользователь Didier написал: > > Hum, not sure why you would do this, but I'm guessing refresh goes in an > infinite async loop. You keep reloading a namespace which creates a thread > to reload itself. > > I can't really explain why the symbol exist

Generated schemas with clojure.spec

2017-06-07 Thread Petr
Hello, I tried to use clojure.spec for validation and test data generation of requests for API described according OpenAPI (https://www.openapis.org/). My code reads an OpenAPI specification, then constructs description that can be used with clojure.spec. The idea was to validate a request map

How aliased "require" is different?

2014-05-03 Thread Petr
Hello. I experienced non obvious behavior of "require namespace as alias" when using clojure.tools.namespace.repl/refresh. If I use aliased namespace then after changing source files and call to refresh I seem to have old values in that alias. If I use plain require all seem to work as expected

Re: Looking to migrate thousands of Clojure applications from 1.2 to 1.5.

2014-01-16 Thread Petr
Yes, but this requires custom class loaders. AFAIK this is already implemented in Immutant project (http://immutant.org/) On Thursday, January 16, 2014 11:13:11 PM UTC+7, solo...@gmail.com wrote: > > Quick update and question: We've put together a preliminary migration plan > and are considering

Re: Factual is hiring Clojure engineers

2014-01-18 Thread Petr
Do you consider non US candidates? Wihout extensive data analysis experience? On Saturday, January 18, 2014 7:34:38 AM UTC+7, Zach Tellman wrote: > > It's been six months since I last announced this, so: Factual is > perpetually hiring smart, driven engineers to solve deep problems in data > an

Casting bug in clojure

2016-02-26 Thread Petr Yanovich
Hi, there is a minor bug described here https://github.com/clojure/clojure/pull/59 Is it a known bug? -- You received this message because you are subscrib

Re: Casting bug in clojure

2016-02-26 Thread Petr Yanovich
26, 2016 at 7:28:44 AM UTC-6, Petr Yanovich wrote: >> >> Hi, there is a minor bug described here >> >> https://github.com/clojure/clojure/pull/59 >> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fclojure%2Fclojure%2Fpull%2F59&sa=D&sntz=1&am

Re: How aliased "require" is different?

2014-05-04 Thread Petr Gladkikh
s (ns-name target-ns)) > > > Ivan > > On Sun, May 4, 2014 at 7:40 AM, Ivan Kozik wrote: > > Hi Petr, > > > > Did you see this? > > https://github.com/clojure/tools.namespace#warnings-for-aliases > > > > Also mentioned: "Aliases to reloaded na

Re: How to generate a serializable java class in Clojure by gen-class?

2013-03-03 Thread Petr Gladkikh
d 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. > >

Java object field access

2011-07-25 Thread Petr Gladkikh
e reflection for this... Can anyone point to what is wrong here? By the way is there already some function that allows to set fields of an object from a map? -- Petr Gladkikh -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: Calling clojure from java.

2011-07-25 Thread Petr Gladkikh
rapped necessary functions to have less arguments to pass from Java. This way later you'll need to load single script only. Say (ns (use lobos.core)) (def db {.}) (defn create2 [table-name] (create db (table table-name))) This might not be convenient in your case however. -- Pe

Re: Java object field access

2011-07-26 Thread Petr Gladkikh
On Tue, Jul 26, 2011 at 3:28 PM, Alan Malloy wrote: > On Jul 25, 11:10 pm, Petr Gladkikh wrote: >> I am trying to construct java object and assign it's fields from a map. >> That is given Java object of class Something { long id; String name; } >> and Clojure map {:id

Re: Java object field access

2011-07-29 Thread Petr Gladkikh
On Tue, Jul 26, 2011 at 5:14 PM, Ken Wesson wrote: > On Tue, Jul 26, 2011 at 6:02 AM, Petr Gladkikh wrote: >> On Tue, Jul 26, 2011 at 3:28 PM, Alan Malloy wrote: >>> On Jul 25, 11:10 pm, Petr Gladkikh wrote: >>>> I am trying to construct java object and assign it&

Predicate problem

2011-08-02 Thread Petr Gladkikh
tains some of elements? -- Petr Gladkikh -- 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.

Re: Predicate problem

2011-08-02 Thread Petr Gladkikh
@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=

Re: "Elegant tools deserve elegant solutions." -- L. E. Gant

2011-08-11 Thread Petr Gladkikh
nning to think I > have selected an arduous path (for me). > > Thoughts? > Somehow offtopic maybe, but have you looked at Snowball http://snowball.tartarus.org/ ? Algorithm is different but language that is used to describe stemmers there is almost lisp and may be useful at least as refe

Source code as metadata

2012-03-29 Thread Petr Gladkikh
like NullPointerException in #(/ % d) in (defn c [d] ( ... 13)) in bugs.clj line 17 I have been using Clojure occasionally for some development automation so I could be missing something. What do you think of this idea? -- Petr Gladkikh -- You received this message because you are subscribed to the Google G

Re: Better ways to make time tansformations?

2012-03-31 Thread Petr Gladkikh
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 -- Petr Gladkikh -- You received this messa

Re: Errors in Clojure

2011-08-19 Thread Petr Gladkikh
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.

Re: Thoughts on CUDA + Clojure

2011-09-12 Thread Petr Gladkikh
much more tightly with existing code. > > > > Any thoughts? Besides that I'm crazy... > > Timothy > In my opinion It would be wiser to target OpenCL first. So this effort will not depend on particular hardware vendor. AFAIK OpenCL is already supported by Intel, AMD

Re: Ending or closing malformed line in REPL

2011-12-05 Thread Petr Gladkikh
d - 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 -- Petr Gladkikh -- You received this message because you are subscri

Re: are non programmers the better programmers?

2012-01-18 Thread Petr Gladkikh
ways of using some given technology or tool. But then there is more: now I often can see redundant or unnecessary aspects of some systems that account for say 20-30% of whole codebase. This is the thing that my colleagues with little experience usually do not see since it is always obscured by nume

Re: [ANN]: cljsh & repls 1.6.0 - so many repls, so little time…

2012-02-06 Thread Petr Gladkikh
p > with any others… > > Even though it all seems to work pretty well on my macosx… your mileage may > vary on the other unixes, and it most probably won't work on windows… maybe > cygwin(?). Please let me know of any compatibilty issues. > > Next step: extend it to supp

Re: Mobile Clojure

2010-11-13 Thread Petr Gladkikh
26642c?pli=1 -- Petr Gladkikh -- 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 unsub

Re: Purpose of Macros

2010-11-29 Thread Petr Gladkikh
this direction http://petrglad.blogspot.com/2010/02/stream-close-template.html). Sorry, just nitpicking. -- Petr Gladkikh -- 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

Re: Quicksort with accumulator

2010-12-28 Thread Petr Gladkikh
oup, 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://group

Re: Quicksort with accumulator

2010-12-28 Thread Petr Gladkikh
And also qsort may take up to n stack frames for collection of n elements if you partition function is not optimal. In your case - if input collection is sorted (as long as you split by first element). On Tue, Dec 28, 2010 at 11:13 PM, Petr Gladkikh wrote: > Why do you call qsort* inside

Why take-last of empty collection is nil?

2011-02-02 Thread Petr Gladkikh
l)) I wonder, is there already such function somewhere in Clojure libraries? -- Petr Gladkikh -- 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 ar

Re: Why take-last of empty collection is nil?

2011-02-03 Thread Petr Gladkikh
On Thu, Feb 3, 2011 at 1:31 PM, Meikel Brandmeyer wrote: > Hi, > > On 3 Feb., 08:04, Petr Gladkikh wrote: > >> Should not it be empty colection instead? >> It seems odd to me since it is inconsistent and forces to consider one >> more case (nil or collection). &g