Re: Official Clojure port to Python AST

2025-04-07 Thread Jan Wedekind
Recently somebody pointed the Clojure Python bridge to me: https://github.com/clj-python/libpython-clj Maybe that can be used for accessing Torch in Clojure. You can of course train models in Python and then use the ONNX runtime to use them in Clojure: https://www.wedesoft.de/software/2025/02/13

Re: s/valid? does not tell me if the data is valid as supplied

2018-02-22 Thread Jan Rychter
de don’t even mention s/conformer, I’m > not sure where that recommendation should live. Alex, any thoughts on this, > since you seem to be the one most often making the recommendation? > As a spec user, I would expect to learn about this from the spec guide. Also, I still believe t

Re: s/valid? does not tell me if the data is valid as supplied

2018-02-21 Thread Jan Rychter
On Tuesday, February 20, 2018 at 4:53:33 PM UTC+1, Alex Miller wrote: > > This is exactly why we recommend that you not use conformers for coercion. > Conformers were added primarily as a tool for building custom composite > spec types (for example, we used it to build keys* from keys). > I am a

s/valid? does not tell me if the data is valid as supplied

2018-02-20 Thread Jan Rychter
I've been using spec for a while now, in a reasonably large code base (>30k lines of Clojure and ClojureScript) and there is an issue that bit me several times. I use conformers for coercing data that is *almost* what I need, usually when reading from JSON (RethinkDB). Common conformers are key

Re: An Annotation within an Annotation

2017-11-01 Thread Jan Stavel
n only be applied to IMetas, compiling:(rhsm/cockpit/tests/register_tests.clj:88:35) Have a good day, Jan Stavel -- 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

An Annotation within an Annotation

2017-11-01 Thread Jan Stavel
welcome. Have a good day, Jan Stavel -- 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 u

Parsing and querying binary .fit files in Clojure

2017-04-05 Thread Jan Herich
ranges and also virtual elevation profile for accurate Cda estimations by Robert Chung's method <http://anonymous.coward.free.fr/wattage/cda/indirect-cda.pdf>. If you have any suggestions or ideas for improvement, just write me here, or open a PR. Cheers Jan -- You received this me

Re: [ANN] data.avl 0.0.13 – fast sorted collections with O(log n) slices and nth

2015-12-09 Thread &#x27;Jan-Paul Bultmann' via Clojure
Very awesome :D! Cheers, Jan > On 09 Dec 2015, at 10:39, Michał Marczyk wrote: > > Hi, > > I am pleased to announce the 0.0.13 release of data.avl, a Clojure > Contrib library providing highly performant drop-in replacements for > Clojure(Script)'s built-in sor

Re: Awesome Clojure Engineer Opportunity

2015-10-12 Thread &#x27;Jan-Paul Bultmann' via Clojure
Hey Rameen, Cool, I didn’t know that Apple was using Clojure internally. Cheers, Jan > On 12 Oct 2015, at 22:00, Rameen Fattahi wrote: > > Hi Everyone, > > My name is Rameen and I'm looking for a passionate Clojure engineer for a > very confidential project at one o

Re: rand-nth on empty collections

2015-09-30 Thread &#x27;Jan-Paul Bultmann' via Clojure
o be shure that the nil returned is actually an element of the collection. cheers Jan > On 30 Sep 2015, at 20:18, Mark Engelberg wrote: > >> On Wed, Sep 30, 2015 at 12:14 PM, Mark Engelberg >> wrote: >> I also think it makes perfect sense for rand-nth to throw a

Clojure Jobs Available

2015-03-30 Thread Jan Drake
cureOne™ is the best place to be. We care about solid engineering, reliable and resilient systems, low latency distributed processing, streaming analytics, high scalability, and extreme performance… and we're doing all of them. If you're interested, please deliver a resume to jobs

Re: Is this the good way to write get-percentage

2015-02-13 Thread Jan-Paul Bultmann
it higher order, keyword configured or pre `comp`ed. Cheers Jan -- 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 pati

Re: Architectural doubts

2015-01-31 Thread Jan-Paul Bultmann
Why not stream frames directly into the datomic db as they fall out of gloss? This should be faster at query time anyhow due to indexes, and let's datomic handle the memory management. cheers Jan > On 31 Jan 2015, at 11:39, Milton Silva wrote: > > While using wireshark to analyse

Re: When to use metadata

2015-01-29 Thread Jan Herich
Solussd is absolutely correct, but maybe even more simplistic (or easier to grasp) explanation would be to use metadata if you don't want the additional (meta)data to change the equality semantics of the map, for example: (def test-desc1 {:number-of-threads 10}) (def test-desc2 ^{:integration t

Re: if-not implementation

2015-01-22 Thread Jan-Paul Bultmann
implementation of not, so that no incompatibilities arise should not become a protocol one day? Cheers Jan > On 22 Jan 2015, at 01:32, Mikera wrote: > > Interesting - there seems to be a very slight performance advantage to your > version on my machine (consistently about 25% fa

Re: DSL in RTL (Right to Left) languages.

2015-01-13 Thread Jan-Paul Bultmann
glish ;) cheers Jan > On 14 Jan 2015, at 05:52, clojure.u...@gmail.com wrote: > > Hi > > I need to write a dsl in Arabic which is a RTL. I am not sure how to get > started with such a dsl in clojure. Any pointers with be really appreciated. > > Thanks > > -- >

Re: Author a Book on Clojure - Packt Publishing

2014-12-22 Thread Jan-Paul Bultmann
te of time. Of course things might have changed by now and your mileage may vary. I'm just thinking that if somebody takes the time of writing a book on Clojure, it should at least be worthwhile. All the best, Jan > On 20 Dec 2014, at 09:07, Tushar Gupta wrote: > > I am Tushar Gu

Re: [ANN] stateful-check 0.1.0 - test stateful systems with test.check

2014-12-08 Thread Jan Stępień
tive was to expose an interface closely resembling original QuviQ eqc API. How natural this feels in Clojure is a subject open for discussion. I haven't felt constrained by this API. Still, to be honest, I haven't used it to test more than some simple experiments yet. Best, Jan --

Re: [ANN] stateful-check 0.1.0 - test stateful systems with test.check

2014-11-28 Thread Jan Stępień
Hi Carlo, Thanks for sharing! I see that generative testing of statful computations is a popular topic in the Clojure world these days; I think we've started working on our libraries nearly the same day :) https://github.com/jstepien/states All the best, Jan -- You received this me

Re: If code is data why do we use text editors?

2014-11-14 Thread Jan-Paul Bultmann
would embrace it, but it works on text as well. Same pretty much goes for codeq, if that is not dead. One could define a Clojure subset that is valid EDN though, which would make everything from serialisable functions to a nano-pass compiler a lot easier. This has to be the first step imho. Cheer

Re: better way to group consecutive numbers in a vector?

2014-11-07 Thread Jan-Paul Bultmann
uld be considered? Also I’d be intrigued to know the rationale behind `partition-by`. Cheers, Jan > On 07 Nov 2014, at 18:56, Alex Hammel wrote: > > Here's my take on the 'add delimiters and split' approach. Bonus `congeal > function, which chunks collections on any condi

Re: Question about test.check, and knossos

2014-10-26 Thread Jan Stępień
On Thursday, October 23, 2014 10:04:52 AM UTC-4, Jan Stępień wrote: I've begun to work on such a tool not long ago. Thomas Arts, who gave a talk at our local FP user group meetup [mλ], inspired me to try out the approach you're describing in Clojure.

Re: Question about test.check, and knossos

2014-10-23 Thread Jan Stępień
]. I find it very interesting but I haven't yet had time to try it out. It'd be great to have it integrated, though. I demonstrated the tentative API in [gist], where some simple properties of HashSet and Clojure vector are checked. The gist also shows how an exemplary failure looks, includ

Re: Schrodinger's cat in clojure?

2014-10-11 Thread Jan-Paul Bultmann
ve > to worry about keeping large data structures in memory, etc. But in many > situations, those features aren't needed.) > > That's what I mean by "turning off laziness": Replacing every function that > returns a lazy sequence with its closest non-lazy

Re: Schrodinger's cat in clojure?

2014-10-11 Thread Jan-Paul Bultmann
#x27;t want the properties of a seq, then use another data structure, like a vector. On 11 Oct 2014, at 18:14, Mars0i wrote: > Thanks Jan-Paul. That's helpful. I wonder whether, if all lazy functions > were rewritten in terms of transducers, it would then be easy to turn > laz

Re: Schrodinger's cat in clojure?

2014-10-11 Thread Jan-Paul Bultmann
Transducers build up transformation steps, with new generic operations like single arg `map` and `filter`, and then apply these transformations to a collection using an evaluation function. This function decides if operations are done lazily, eagerly, or on a channel. Note that while this makes

Seeking Large Companies That Employ Clojure

2014-10-09 Thread Jan Drake
le, in production, etc. If you are one, please contact me directly; if you know of one, please make me an introduction. Onward in the great Clojure Adventure! Regards, Jan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this g

Re: `as->` does not work with `recur`.

2014-10-05 Thread Jan-Paul Bultmann
, Oct 5, 2014 at 4:56 AM, Leon Grapenthin > wrote: > Thought: > > (defmacro as-> > [expr name & forms] > `(let [~name ~expr >~@(interleave (repeat name) (butlast forms))] >~(last forms))) > > > > > On Su

`as->` does not work with `recur`.

2014-10-04 Thread Jan-Paul Bultmann
eans that a recur within a `as->` will cause a CompilerException, because it is not at the tail position. Thoughts? Cheers, Jan-Paul -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegrou

Re: Is Clojure a language for growth?

2014-08-21 Thread Jan Ziniewicz
> > > If a company wants to be able to hire staff and get them up to speed, as > well as have options for bringing in contractors and outsourcing some work, > is Clojure a good choice? > My friend works in a project which is being rewritten from Rails to Clojure (due to usual scaling problems

Re: complex numbers in clojure

2014-08-16 Thread Jan-Paul Bultmann
I agree that Clojure could really use an imaginary number type. The best place to start with this might be `clojure.math.numeric-tower` because it already provides a `MathFunctions` protocol that defines a square root operation. Cheers Jan On 15 Aug 2014, at 19:54, Maik Schünemann wrote

Re: Idiomatic clojure on building a sequence

2014-05-21 Thread Jan Herich
Hi Colin, Have a look at the 'as->' macro, its very helpful in some cases, as: (-> [] (conj some-element) (as-> some-seq (if some-condition? (conj some-seq some-element) some-seq) (if some-other-condition? (conj some-seq some-other-element) some-seq)) (t

Re: Comparing classes in case statement

2014-02-27 Thread Jan Herich
>From official clojure documentation: "The test-constants are not evaluated. They must be compile-time literals" Dňa štvrtok, 27. februára 2014 14:03:04 UTC+1 Markus Bader napísal(-a): > > Hello, > > if I am not too dumb, it seems that comparing for classes does not work in > case statements, li

Re: Comparing Regular Expression pattens for equality?

2014-02-26 Thread Jan Herich
Clojure re-uses java.util.regex.Pattern objects. This object doesn't override equals method, so object references are always compared. But you can easily get pattern string from compiled pattern and then compare just them: user=> (= (.pattern #"test") (.pattern #"test")) true Dňa streda, 26.

Re: Latest web framework for clojure

2014-02-25 Thread Jan Herich
It depends also on your requirements. For example if you want your app to work in many deployment scenarios (standalone Jetty or Tomcat, J2EE web containers...) and you may have to use servlet 3.0 API asynchronous features, nothing beats pedestal currently. The concept of interceptors is lit

Re: Shutting down core.async executors threadpool

2014-02-24 Thread Jan Herich
ybe it is a tomcat issue. > > > On Mon, Feb 24, 2014 at 7:06 PM, Jan Herich > > wrote: > >> Hi Folks, >> >> I developed an pedestal application which uses core.async for real-time >> server push. >> Everything works fine, except little problem w

Shutting down core.async executors threadpool

2014-02-24 Thread Jan Herich
/shutdown.sh), it won't quit. I can see with VisualVM that it is because of the core.async executors threadpool used to dispatch go blocks which is not properly teared down. Any ideas how to solve this ? Cheers Jan -- You received this message because you are subscribed to the Google G

Re: (series of swap! on atom) ==> single swap!

2014-02-16 Thread Jan Herich
ranteed to run only once. Dňa pondelok, 17. februára 2014 2:36:59 UTC+1 t x napísal(-a): > > Hi Jan, > > You're right. I'm wrong. > > I'm grateful you pointed this out -- this would have otherwise been > impossible to debug. > >

Re: (series of swap! on atom) ==> single swap!

2014-02-16 Thread Jan Herich
I'm afraid your understanding of atom swap! operations is not quite correct -> update function must (or should) be pure as well. See the documentationfor swap!, update function could be potentially called multiple times if there are more t

Re: Example in Joy of Clojure, 2nd edition (MEAP)

2014-02-15 Thread Jan Herich
Hello Eric, You can rewrite this functionality with key# and r# instead of ~'key and ~'r and it would work just as well, it's only not necessary to use unique symbols here, because you are not using them in the function body anyway, so there is no danger of accidental var capture. To be hones

Re: Handy clojure function to transform prepared statement queries

2014-02-10 Thread Jan Herich
6>. > > And until I do, I'm not going to document it, or make it official. But it's > there in v0.3.0, so if you want to field-test it, do let me know your > experiences. :-) > > (And, FWIW, I completely agree with Sean. This kind of thing definitely > be

Re: Handy clojure function to transform prepared statement queries

2014-02-10 Thread Jan Herich
discuss this topic. Dňa pondelok, 10. februára 2014 0:16:01 UTC+1 Sean Corfield napísal(-a): > > As maintainer of java.jdbc I'd say this is a more appropriate feature > for a DSL library like SQLingvo or HoneySQL (which may already support > something like this - I haven&#x

Handy clojure function to transform prepared statement queries

2014-02-09 Thread Jan Herich
["id = ? AND user_id IN (?,?,?) AND msg_id = ?" 1 2 3 4 5]) Now my question is, do you think that something in this flavor would be good addition to clojure/java.jdbc or yesql libraries (the latter one is probably more appropriate for inclusion) ? If so, i will try to refine and

Re: Idiomatic way to construct potentially time bound target channel in core.async

2014-02-03 Thread Jan Herich
Ok, so i'm thinking about such one-shot detachable input pipe channels... (ns async-util.input-pipe (:require [clojure.core.async.impl.protocols :as impl] [clojure.core.async :refer [ > Hello Folks, > > I need to construct core.async channel with following semantics: > > 1. When the

Re: Idiomatic way to construct potentially time bound target channel in core.async

2014-02-02 Thread Jan Herich
If anyone is interested, that's roughly what i'm currently thinking about... (ns async-util.input-pipe (:require [clojure.core.async.impl.protocols :as impl] [clojure.core.async :refer [ > Hello Folks, > > I need to construct core.async channel with following semantics: > > 1. When t

Idiomatic way to construct potentially time bound target channel in core.async

2014-01-31 Thread Jan Herich
Hello Folks, I need to construct core.async channel with following semantics: 1. When the channel is created, timeout is attached to channel 2. After timeout passes out, channel is closed 3. It's possible to detach timeout from the channel before it passes out Now i implemented it with something

Re: side-effect only function with map-like syntax (again)

2014-01-27 Thread Jan Herich
How about doseq ? Dňa utorok, 28. januára 2014 5:28:04 UTC+1 Mars0i napísal(-a): > > Back in 2007 ( > https://groups.google.com/forum/#!searchin/clojure/mapc/clojure/x0PDu_D6mP0/3A7CZe-ZDWAJ), > > Henk Boom raised the possibility of inclu

Re: Read file contents as map

2014-01-26 Thread Jan Herich
And if you are not sure about that, just use edn-only reader: (require '[clojure.tools.reader.edn :as edn]) (edn/read-string (slurp "file")) Dňa nedeľa, 26. januára 2014 17:12:32 UTC+1 mynomoto napísal(-a): > > If you are sure that the file doesn't contain malicious code you can use: > > (read-s

Re: core.async count in a channel

2014-01-21 Thread Jan Herich
ur description of the problem, but for me, it seems like a perfect fit. Jan Dňa utorok, 21. januára 2014 17:56:56 UTC+1 Paul Viola napísal(-a): > > I think this is all well and good for a particular use of channel. > > So perhaps I am misusing channels?? > > To repeat: in one case I

Re: Servlet adapter for ring handlers with support for asynchronous processing

2014-01-18 Thread Jan Herich
t;, looks very interesting. Jan Dňa sobota, 18. januára 2014 20:32:19 UTC+1 Shantanu Kumar napísal(-a): > > Hi Jan, > > This not directly related, but i thought it might be useful in some way. > In case you do the java interop stuff on your own to implement the servlet > 3

Servlet adapter for ring handlers with support for asynchronous processing

2014-01-18 Thread Jan Herich
n... If you assembled something similar yourself, or you now about such project (even in development, immature, alpha), please let me know, thank you very much. Jan -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group

Re: Grouping and nested keys in a hash

2014-01-16 Thread Jan Herich
and only later i collected my courage and approached Clojure again. Determination and patience is very important. Dňa štvrtok, 16. januára 2014 15:54:47 UTC+1 James napísal(-a): > > Wow, I feel like a clumsy fool bashing parens together. > > Have you been using Clojure for a long tim

Re: Grouping and nested keys in a hash

2014-01-16 Thread Jan Herich
Oh, yes, my mistake, it should be data instead of s Dňa štvrtok, 16. januára 2014 15:56:18 UTC+1 James napísal(-a): > > Thank you for sharing. > > I think the final `s` needs to be `data`, right? > > On 16 Jan 2014, at 14:53, Jan Herich > > wrote: > > Here we go, mo

Re: Grouping and nested keys in a hash

2014-01-16 Thread Jan Herich
Here we go, more generic solution: (defn transform [data delimiter] (reduce (fn [acc [k v]] (let [key-strs (-> k (name) (str/split delimiter))] (assoc-in acc (mapv keyword key-strs) v))) {} s)) Dňa štvrtok, 16. januára 2014 14:46:46 UTC+1 James napísal(-a): > > Hello all, > > I've fo

Re: Grouping and nested keys in a hash

2014-01-16 Thread Jan Herich
My solution would work only for fixed 2 level deep maps, but it would be not so hard to modify it that it will be much more generic :) Dňa štvrtok, 16. januára 2014 14:46:46 UTC+1 James napísal(-a): > > Hello all, > > I've found myself stuck trying to move matching keys in a hash into a > nested

Re: Grouping and nested keys in a hash

2014-01-16 Thread Jan Herich
Another way of doing that: (def data {:b--name "B", :a--id 1, :b--id 2, :a--name "A"}) (defn transform [data delimiter] (reduce (fn [acc [k v]] (let [[f-k s-k] (-> k (name) (str/split delimiter))] (assoc-in acc [(keyword f-k) (keyword s-k)] v))) {} s)) (transform data #"--") ;; {:a

Re: [ANN] incise 0.1.0 - An extensible static site generator

2014-01-14 Thread Jan Herich
Hello Ryan, Thank you for the project, i was always missing a good static site generator written in clojure ! You took some interesting design decisions with extensibility. I'm currently working on the similar project , even if my design is very differe

Re: A question about lazy seq with io

2014-01-13 Thread Jan Herich
As Mauricio already mentioned, map is not meant to be used for side-effects, if you want to need to evaluate a sequence for side-effects, use doseq instead. Regarding your first question about explicit loop-recur, i think it's reasonable w

Re: Adding query customization to Ring-based REST APIs

2014-01-12 Thread Jan Herich
Hello Alexander, I did some work in this area some time ago, and the result was service-hub library - created to simplify basic CRUD services. It's designed to allow more then one type of data-store, currently it supports SQL databases (i use my own fork

Re: HttpKit, Enlive (html retrieval and parsing)

2014-01-11 Thread Jan Herich
I don't recommend using java's built in HTTP retrieval (by passing java.net.URL object to enlive html-resource function). Not only is it significantly slower then using clj-http (which uses apache-http client under the hood), but it's also unreliable when issuing more parallel requests. Current

Re: Sorting Nested Vectors and filter out some

2014-01-04 Thread Jan Herich
Hello Jeff, This should do the trick, at least it worked with data set you provided :) Dňa sobota, 4. januára 2014 11:31:07 UTC+1 Jeff Angle napísal(-a): > > Hi...I get my nested vector from a database, then map a function that > fo

Re: Parallel http requests

2013-12-31 Thread Jan Herich
Maybe it's not exactly what you need, but i did similar thing once - i needed to scrape many linked html resources to extract tree data structure, each request/parse operation took considerable time - around 2 seconds - i was using clj-http/enlive combo (which is actualy Apache HttpClient/ TagS

Re: Akka-like framework in Clojure ?

2013-12-27 Thread Jan Herich
Hi Eric, Maybe pulsar is what you are looking for, but i recommend you to also discover the other way of doing concurrency in clojure instead of the actor model -> have a look at CSP and its

Re: [ANN] Component: dependency injection and state management

2013-11-21 Thread Jan Herich
This is simple brilliant... The approach proposed and the component "framework" implementing it finally solves the issue with the "necessary evil" (start/stop interactions with statefull components in any bigger Clojure app) by cleverly taking only the best ideas (like using inferred dependency

[ANN] Service-hub - Library for building service-oriented applications

2013-11-11 Thread Jan Herich
with complicated transaction strategies, or to implement asynchronous communication in the effective fashion out of the box, libraries like pedestal-service are much better at those kind of tasks. I still think it could be useful to people, so i decided to announce it. Feedback welcomed, Jan

Re: Clojure in production

2013-06-13 Thread jan
Hi Plínio, at gateprotect, we use clojure in our firewall product for model representation and doing all the hard/logic work. Some stats: ~ 370 namespaces ~ 25000 sloc A great part of that is written in our model DSL. Cheers, Jan http://www.gateprotect.com We are hiring! http

[ANN] Himilsbach 0.1.0 is released

2013-05-14 Thread Jan Stępień
iated! All the best, -- Jan Stępień -- -- 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: [ANN] Himilsbach 0.0.1 is released

2013-05-10 Thread Jan Stępień
W dniu poniedziałek, 6 maja 2013 05:12:37 UTC+2 użytkownik Ben Mabey napisał: > > On Sun May 5 18:31:59 2013, Mikera wrote: > > On Tuesday, 30 April 2013 04:12:14 UTC+8, Jan Stępień wrote: > > > >> Dear Clojurians, > >> > >>

[ANN] Himilsbach 0.0.1 is released

2013-04-29 Thread Jan Stępień
Dear Clojurians, I'm very happy to announce Himilsbach 0.0.1. Himilsbach is a tiny actor library for intra-process messaging inspired by Erlang. Find it at https://github.com/jstepien/himilsbach Your feedback is very much appreciated! All the best, -- Jan Stępień -- -- You received

Re: Are futures garbage-collected?

2011-09-29 Thread Jan Rychter
Thanks to everyone for the helpful replies. I've been using futures in this manner for a long time now and they work fine, but I wanted to make sure this is the specified behavior. --J. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to thi

Are futures garbage-collected?

2011-09-28 Thread Jan Rychter
If I create a future but do not hold on to it anywhere and never dereference it, is the thread guaranteed to run until successful completion? In other words, if I create futures entirely for side effects, should I worry about them getting terminated and GCd? I looked for an answer but could not

Re: Migration to 1.3 for mortals

2011-09-13 Thread Jan Rychter
On Sep 13, 1:44 am, Stuart Sierra wrote: > > Since the new, separated contrib libraries are supposed to be > > compatible with Clojure 1.2, you could perhaps also start migrating > > one lib at a time at your leisure.  This might even enable you to > > contribute to a migration document. > > Yes,

Re: Migration to 1.3 for mortals

2011-09-12 Thread Jan Rychter
On Sep 10, 9:31 pm, Sean Corfield wrote: > On Sat, Sep 10, 2011 at 9:46 AM, Jan Rychter wrote: > > If you use Clojure to build an application that you subsequently > > launch and maintain, it is pretty much a given that you use contrib. > > Lots of it, in fact. > > I

Re: Migration to 1.3 for mortals

2011-09-10 Thread Jan Rychter
On Sep 10, 5:20 pm, Steve Purcell wrote: > David Nolen writes: > > Waiting for contrib authors to sort out their libraries seems > > unrelated as to whether 1.3 should or should not be released. That's > > like delaying Python 3 because libraries don't support it yet. It > > still wouldn't be rel

Re: Migration to 1.3 for mortals

2011-09-10 Thread Jan Rychter
On Sep 9, 8:04 pm, Sean Corfield wrote: > On Fri, Sep 9, 2011 at 1:09 AM, Jan Rychter wrote: [...] > > I think issues like that are fundamentally important if Clojure is to > > be adopted for production work. > > I agree - which is why I'm pushing on clojure-dev for s

Re: Migration to 1.3 for mortals

2011-09-09 Thread Jan Rychter
On Sep 8, 10:36 pm, Armando Blancas wrote: > There's this page:http://dev.clojure.org/display/doc/Clojure+Contrib > > Here's the main page for the new repos:https://github.com/clojure Problem is, none of those pages help with my problem: how do I go from a list of 1.2 clojure-contrib modules to a

Migration to 1.3 for mortals

2011-09-08 Thread Jan Rychter
How do we mere mortals (that develop and maintain large apps) migrate to 1.3? I thought I'd be able to at least estimate the effort involved for our application in about an hour today, but failed. In spite of searching, looking through various repos, reading the wiki and in general googling around

Re: Indexing a nested sequence

2011-08-12 Thread Jan
mensional input string: (zipmap (map vector (for [y (range height) x (range width)] y) (cycle (range width))) "#I##O#") => {[1 2] \#, [1 1] \O, [1 0] \#, [0 2] \#, [0 1] \I, [0 0] \#} HTH, Jan -- You received this message because you are subsc

Re: group tag for clojure newsgroup

2010-03-04 Thread Jan Rychter
Rich Hickey writes: > On Mar 4, 2:56 am, TimDaly wrote: >> For the other groups that I subscribe to, the email subjects are >> always prefixed with the group name, e.g. >> >> Re: [sage-devel] This is the mail subject >> >> This makes it possible to reliably group the emails into folders. >> Is i

Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Jan Rychter
I haven't hacked on new Clojure stuff for the past two months or so. Now, having updated my repositories, I find that everybody just dropped ant and moved to leiningen. I tried to make sense of things, but can't. I must be missing something big here. It seems that leiningen assumes that you are b

Re: variation of time macro

2009-12-14 Thread jan
average time in the report? > > Usage: > user> (time 10 (* 21 2)) > "Elapsed time: 0.201 msecs, Average: 0.0201 msecs" > 42 > user>  I think this is a bad idea, read this article for reasons why http://www.ibm.com/developerworks/java/library/j-benchmark1.html --

Re: Code improvement: incrementing a meta val

2009-11-18 Thread jan
"Increments the :index val in the givens state's metadata." [state] (vary-meta state update-in [:index] inc)) -- jan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googl

Re: Topological sort

2009-11-11 Thread jan
te output of the sorting. I was wondering if anyone has > already done something similar? clojure.contrib.graph/dependency-list might be close enough for you (use 'clojure.contrib.graph) (dependency-list {:nodes [:a :b :c] :neighbors {:a [:b :c]

Re: newbie question

2009-11-11 Thread jan
(fn [x] (every? (dual x) preds))) > > (filter > (conjunction even? (partial >= 16) (partial <= 9)) > (range 1 20)) for cases like this you can also leverage reader macros (filter #(and (even? %) (>= 16 %) (<= 9 %)) (range 1 20)) -- jan -- You received this message

Re: Code formatter

2009-11-05 Thread jan
;    aligned with the first by inserting additional spaces before the >    ;, the comments are aligned in this manner; exception to item 2. it doesn't handle these comments gracefully (format-code " header comment (defn test-comments []

Re: Baffled by NPE

2009-11-03 Thread jan
] (when-not (empty? items) (f (first items)) (recur f (rest items -- jan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegrou

Re: Printing to *out* in another thread

2009-10-17 Thread jan
edirect output to the repl with M-x slime-redirect-inferior-output or place this line in your .emacs file (add-hook 'slime-connected-hook 'slime-redirect-inferior-output) -- jan --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: Clojure/EPL and the GPL

2009-08-30 Thread Jan Rychter
Tassilo Horn writes: [...] > BTW: What's the reason that Clojure is licensed under the EPL and the > contrib stuff under CPL? Since clojure is not really eclipse-related, I > don't see a good rationale. IMHO, the Lesser GPL would be a much better > fit. Then you can use clojure also in commerc

Re: replace-subtree for zippers?

2009-08-22 Thread Jan Rychter
Stefan van der Meer writes: > On Aug 21, 12:05 pm, Jan Rychter wrote: >> think crossover in genetic programming (this is actually what I need >> this for). > I've written a genetic programming framework in Clojure, it might > be of interest if you're looki

Re: replace-subtree for zippers?

2009-08-22 Thread Jan Rychter
Meikel Brandmeyer writes: > Hi, > > On Aug 21, 12:05 pm, Jan Rychter wrote: > >> It isn't what I want. But that's because I misspecified what I actually >> wanted. I didn't think about the problem enough. I need something more >> akin to a spl

Re: replace-subtree for zippers?

2009-08-21 Thread Jan Rychter
Meikel Brandmeyer writes: > A transcript: > > ; Create trees... > user=> (def t1 [1 [[2 3] 4]]) > #'user/t1 > user=> (def t2 [[[:a :b] :c] :d]) > #'user/t2 > > ; Create zippers and navigate to subtrees... > user=> (def zt1 (-> (zip/vector-zip t1) zip/down zip/right)) > #'user/zt1 > user=> (zip/no

Re: clojure success story ... hopefully :-)

2009-08-21 Thread Jan Rychter
bradford cross writes: > Hi Chad, yep, that was me. We do hope to open source some stuff soon. > > First will probably be our wrappers for cascading/hadoop and s3. Those would be of great interest to many of us. Please do. --J. --~--~-~--~~~---~--~~ You receive

replace-subtree for zippers?

2009-08-20 Thread Jan Rychter
Has anyone written a replace-subtree for zippers? I need to replace an entire subtree with another one (from another zipped structure) and found out that zip/replace won't help me there. Writing my own has proven remarkably difficult, or perhaps I'm missing something obvious. Any help appreciate

Re: Idiom for array slicing

2009-08-17 Thread Jan Marecek
> (defn slice [coll & keys] >  (remove nil? (map #(get coll %) keys))) this doesn't handle nils, here is a better definition (defn slice [coll & keys] (let [not-found (Object.)] (remove #(identical? % not-found) (map #(get coll % not-foun

Re: Idiom for array slicing

2009-08-17 Thread jan
d do it: (defn extract [coll & keys] (map #(get coll %) keys)) or (defn slice [coll & keys] (remove nil? (map #(get coll %) keys))) -- jan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clo

Re: ANN: Clojuratica -- A seamless interface to Mathematica for fast numerics and more

2009-07-27 Thread Jan Rychter
Garth Sheldon-Coulson writes: > I would like to announce *Clojuratica ,* a > high-performance, seamless Clojure interface to Wolfram > Mathematica. Wow! This is exactly what I needed. I've been looking for interfaces to

Re: Risks of (over-)using destructuring?

2009-07-24 Thread jan
font-lock-function-name-face nil t)) + ;; Private keywords :foo- + ("\\<:\\sw+-\\>" 0 font-lock-constant-face) ;; Constant values. ("\\<:\\sw+\\>" 0 font-lock-builtin-face) ;; Meta type annotation #^Type -- jan --~--~-~--~~-

Re: sizeof in Clojure

2009-07-24 Thread Jan Rychter
> On Jul 21, 5:51 am, Jan Rychter wrote: >> Is there a way to get the size of a data structure in Clojure? >> >> I've been wondering how much more space-efficient vectors are than >> lists, but I don't know how to measure it. Stuart Sierra writes: > Shor

sizeof in Clojure

2009-07-21 Thread Jan Rychter
Is there a way to get the size of a data structure in Clojure? I've been wondering how much more space-efficient vectors are than lists, but I don't know how to measure it. --J. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Re: turn a seq into a list

2009-07-16 Thread Jan Rychter
Jarkko Oranen writes: > On Jul 15, 1:54 pm, Jan Rychter wrote: >> I've been looking for a function that would take a seq and create a list >> (a real clojure.lang.PersistentList), but haven't found one. The closest >> I got was: >> >> (apply list

  1   2   >