Re: while loop

2013-06-14 Thread Meikel Brandmeyer (kotarak)
Hi, another way if it's not an enumeration or the like: (doseq [entry (repeatedly #(.getNextEntry stream)) :while entry] (println (.getName entry))) Kind regards Meikel -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group,

Re: while loop

2013-06-14 Thread Josh Kamau
Thanks Meikel. That works exactly as i wanted. Now, how can i put all the names in a vector ? On Fri, Jun 14, 2013 at 9:19 AM, Meikel Brandmeyer (kotarak) m...@kotka.dewrote: Hi, another way if it's not an enumeration or the like: (doseq [entry (repeatedly #(.getNextEntry stream)) :while

Re: while loop

2013-06-14 Thread Josh Kamau
I figured it out... with a for loop. THanks Josh On Fri, Jun 14, 2013 at 9:40 AM, Josh Kamau joshnet2...@gmail.com wrote: Thanks Meikel. That works exactly as i wanted. Now, how can i put all the names in a vector ? On Fri, Jun 14, 2013 at 9:19 AM, Meikel Brandmeyer (kotarak)

Re: while loop

2013-06-14 Thread Meikel Brandmeyer (kotarak)
Am Freitag, 14. Juni 2013 08:40:51 UTC+2 schrieb Josh Kamau: Thanks Meikel. That works exactly as i wanted. Now, how can i put all the names in a vector ? By switching from doseq to for: (vec (for [entry repeatedly #(.getNextEntry stream) :while entry] (.getName entry))) or (-

Re: Clojure generates unnecessary and slow type-checks

2013-06-14 Thread Glen Mailer
This doesn't really answer your question directly, but is there a reason you need to keep this in clojure, or are you just aiming to establish why this is happening? My understanding was that for performance critical code the general advice is to drop down to raw java? Glen -- -- You

Re: Clojure generates unnecessary and slow type-checks

2013-06-14 Thread Jason Wolfe
Thanks for your response. I attempted to answer this in my clarification, but our goal is to attack this 'general advice' and make it possible to get the same speed for array handling in natural-seeming Clojure without writing Java. In particular, we want to create macros that make it easy to

Re: Clojure generates unnecessary and slow type-checks

2013-06-14 Thread David Nolen
Maybe this is an unintended side effect of the changes around unboxed support in loop/recur? On Thu, Jun 13, 2013 at 10:50 PM, Jason Wolfe ja...@w01fe.com wrote: Taking a step back, the core problem we're trying to solve is just to sum an array's values as quickly as in Java. (We really want

Re: End user applications

2013-06-14 Thread Phillip Lord
Wolodja Wentland babi...@gmail.com writes: On 13 Jun 2013 15:31, Aaron Cohen aa...@assonance.org wrote: What about Overtone? http://overtone.github.io/ Overtone is certainly great, but I would rather classify it as a library as you still have to write programs to use it. There might be an

possible side-effect/problem in http://clojure.org/concurrent_programming

2013-06-14 Thread Amir Wasim
I was using the first example to make a process executing parallely (defn test-stm [nitems nthreads niters] (let [refs (map ref (repeat nitems 0)) pool (Executors/newFixedThreadPool nthreads) tasks (map (fn [t] (fn [] (dotimes [n

Re: possible side-effect/problem in http://clojure.org/concurrent_programming

2013-06-14 Thread Amir Wasim
complete example (ns wm.test (import [java.util.concurrent Executors]) ) (def deliveries (map char (range 65 90))) (defn- test-fn [delivery another param] (println in test sleeping delivery another param) (let[sleep-for (rand-int 1)] (println sleeping for sleep-for)

Re: Clojure generates unnecessary and slow type-checks

2013-06-14 Thread Mikera
Hi Jason, Have you guys taken a look at core.matrix for any of this stuff? We're also shooting for near-Java-parity for all of the core operations on large double arrays. (use 'clojure.core.matrix) (require '[criterium.core :as c]) (let [a (double-array (range 1))] (c/quick-bench

Re: possible side-effect/problem in http://clojure.org/concurrent_programming

2013-06-14 Thread Raoul Duke
But only one task was active at a time, although Executors was configured with 4 threads. It occurred to me that map itself is lazy and it is realized in doseq one at a time. A possible fix is to use for instead of map to generate tasks almost makes me wish there were types (er, sorry,

In what OS do you code?

2013-06-14 Thread Erlis Vidal
Hi, I'm a bit curious to know in what OS do you code. Do you prefer iOS, Linux, Windows? Why is that? Because the tools? The environment? Thanks! -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: In what OS do you code?

2013-06-14 Thread Joseph Smith
I write code in OSX. --- Joseph Smith @solussd On Jun 14, 2013, at 8:46 AM, Erlis Vidal er...@erlisvidal.com wrote: Hi, I'm a bit curious to know in what OS do you code. Do you prefer iOS, Linux, Windows? Why is that? Because the tools? The environment? Thanks! -- -- You

Re: In what OS do you code?

2013-06-14 Thread Denis Labaye
Linux everywhere: - Natively @ work - Natively @ home - In a VirtualBox VM in a MacBook air in the tube Reasons: - Free and Open source - Standard (Learn once use everywhere) - Rock solid On Fri, Jun 14, 2013 at 3:46 PM, Erlis Vidal er...@erlisvidal.com wrote: Hi, I'm a bit curious to know

Re: In what OS do you code?

2013-06-14 Thread Erlis Vidal
Gary, thanks for the link! On Fri, Jun 14, 2013 at 9:52 AM, Gary Trakhman gary.trakh...@gmail.comwrote: Linux. I started making the investment 12 years ago with RedHat 6.2 and Slackware, so the extra fuss-time tradeoff is worth it for me, since I can minimize it by now. I can have a

Re: In what OS do you code?

2013-06-14 Thread Denis Labaye
On Fri, Jun 14, 2013 at 3:52 PM, Gary Trakhman gary.trakh...@gmail.comwrote: Linux. I started making the investment 12 years ago with RedHat 6.2 and Slackware, so the extra fuss-time tradeoff is worth it for me, since I can minimize it by now. I can have a working clojure system from

Re: In what OS do you code?

2013-06-14 Thread Gary Trakhman
Yes, I installed the OS, too, that includes emacs, auto-complete, ac-nrepl (I had some problem and had to look stuff up, I can do it faster now). On Fri, Jun 14, 2013 at 9:54 AM, Denis Labaye denis.lab...@gmail.comwrote: On Fri, Jun 14, 2013 at 3:52 PM, Gary Trakhman

Re: In what OS do you code?

2013-06-14 Thread Steven Degutis
OS X on an MBP. The only thing I liked about linux was xmonad. So I wrote a window manager for OS X called AppGrid https://github.com/sdegutis/grs (download the ziphttps://github.com/sdegutis/grs/raw/master/AppGrid.zip) that does everything I want a window manager to do on OS X. And then I made

[ANN] core.incubator 0.1.3

2013-06-14 Thread Chas Emerick
FYI, [org.clojure/core.incubator 0.1.3] has been released: https://github.com/clojure/core.incubator/ The only change was to note that two of the macros it provides (-? and -?) are now deprecated, having been effectively promoted into Clojure itself in v1.5.0 (as some- and some-,

Re: In what OS do you code?

2013-06-14 Thread Laurent PETIT
Linux at work, OS X at home. But this makes no big difference, since my toolchain is java end to end: Eclipse, Maven. 2013/6/14 Erlis Vidal er...@erlisvidal.com: Hi, I'm a bit curious to know in what OS do you code. Do you prefer iOS, Linux, Windows? Why is that? Because the tools? The

Re: In what OS do you code?

2013-06-14 Thread Clinton Dreisbach
I'm the opposite of Laurent (OS X at work and Linux at home) but I agree with him. My toolchain is Java, Clojure, and Emacs, so I notice very little difference between the two. My biggest pain point is differences in shell scripts, mainly because OS X ships with BSD sed instead of GNU sed, which

Re: In what OS do you code?

2013-06-14 Thread Giacomo Cosenza
personally, I code on mac os x. in my company anyone is free to choose the preferred OS (most of our devs are using linux, few of them windows). mimmo On Jun 14, 2013, at 3:46 PM, Erlis Vidal wrote: Hi, I'm a bit curious to know in what OS do you code. Do you prefer iOS, Linux,

Re: In what OS do you code?

2013-06-14 Thread Mayank Jain
Linux/Mac both at work and home. On Fri, Jun 14, 2013 at 8:29 PM, Giacomo Cosenza mimmo.cose...@gmail.comwrote: personally, I code on mac os x. in my company anyone is free to choose the preferred OS (most of our devs are using linux, few of them windows). mimmo On Jun 14, 2013, at 3:46

Javapocalypse

2013-06-14 Thread JeremyS
Hi guys, I just stumbled on this video http://jz13.java.no. I'm sure many of you have found it on hacker news, but for those who haven't here is a bit of fun with our dear jvm. Cheers, Jeremys. -- -- You received this message because you are subscribed to the Google Groups Clojure group.

Re: In what OS do you code?

2013-06-14 Thread Yves S. Garret
Well, you can't really code in iOS last time I checked. But most of the time it's Linux. Preferably natively. Why? Because the tools that I need (VI, Erlang, grep, etc.) are all there and I don't have to sit there and think about how to tie them together (not even Cygwin gets rid of this

Database migrations

2013-06-14 Thread Reginald Choudari
Hello all, I am trying to implement database migrations with Clojure. So far I have been looking at Drift (https://github.com/macourtney/drift) as a candidate for implementing this. My question is, does anyone have a database migration workflow that they use and would like to share? One

Re: Database migrations

2013-06-14 Thread Steven Degutis
Phil uses this really cool trick: https://github.com/technomancy/syme/blob/master/src/syme/db.clj#L66-L119 The benefit is that your migrations are just Clojure functions. No messing around with files or timestamps or whatever. Dead simple. I hope someone extracts it into a lib with tests around

Re: possible side-effect/problem in http://clojure.org/concurrent_programming

2013-06-14 Thread Alan Malloy
The laziness of map is irrelevant here, because .invokeAll is treating it as a collection and realizing it all immediately. Your version with for is just as lazy. What's actually changed is that your map and for produce entirely different outputs: the version with map calls test-fn, and the

Re: Clojure generates unnecessary and slow type-checks

2013-06-14 Thread Jason Wolfe
Hey Mikera, I did look at core.matrix awhile ago, but I'll take another look. Right now, flop is just trying to make it easy to write *arbitrary* array operations compactly, while minimizing the chance of getting worse-than-Java performance. This used to be very tricky to get right when flop

Re: In what OS do you code?

2013-06-14 Thread Mikhail Kryshen
I use GNU/Linux (specifically, Fedora at home and openSUSE, which I don't like much compared to other distros, at work): - I do not trust proprietary software vendors, - I avoid supporting Microsoft and Apple out of ethical issues, - I prefer the software distribution model where software comes

Re: In what OS do you code?

2013-06-14 Thread Jim - FooBar();
I use GNU/Linux exclusively as well...no other OS makes me feel in control :) Jim On 14/06/13 18:57, Mikhail Kryshen wrote: I use GNU/Linux (specifically, Fedora at home and openSUSE, which I don't like much compared to other distros, at work): - I do not trust proprietary software vendors,

Re: In what OS do you code?

2013-06-14 Thread Erlis Vidal
Hi guys! Thanks for all the responses, it looks like Linux is the predominant OS in the Clojure community. On Fri, Jun 14, 2013 at 2:06 PM, Jim - FooBar(); jimpil1...@gmail.comwrote: I use GNU/Linux exclusively as well...no other OS makes me feel in control :) Jim On 14/06/13 18:57,

Re: In what OS do you code?

2013-06-14 Thread Raoul Duke
Thanks for all the responses, it looks like Linux is the predominant OS in the Clojure community. er, wow. that's a bit of a leap, isn't it? -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: In what OS do you code?

2013-06-14 Thread Marcus Lindner
I for example use Windows 8 and Windows 7. Am 14.06.2013 20:15, schrieb Raoul Duke: Thanks for all the responses, it looks like Linux is the predominant OS in the Clojure community. er, wow. that's a bit of a leap, isn't it? -- -- You received this message because you are subscribed to the

Re: In what OS do you code?

2013-06-14 Thread Nico Balestra
What company do you work for Mimmo? Can I send my CV? :) On 14 Jun 2013 15:59, Giacomo Cosenza mimmo.cose...@gmail.com wrote: personally, I code on mac os x. in my company anyone is free to choose the preferred OS (most of our devs are using linux, few of them windows). mimmo On Jun 14,

Re: In what OS do you code?

2013-06-14 Thread Clinton Dreisbach
I think that's more like Linux is the predominant OS among people who love to talk about their OS. In my experience, there's a lot more Mac users than any other group. On Fri, Jun 14, 2013 at 2:11 PM, Erlis Vidal er...@erlisvidal.com wrote: Hi guys! Thanks for all the responses, it looks

Re: In what OS do you code?

2013-06-14 Thread Russell Whitaker
Erlis, that's a bit of a leap, you can't make that conclusion from your sampling. Among other faults, your dataset suffers greatly from selection bias. Several _layers_ of selection bias, in fact. My own setup, while I'm here: - OS X on the desk/laptop; - Unbuntu as the deployment target.

Re: In what OS do you code?

2013-06-14 Thread Jim - FooBar();
hehe :) does this mean that apple is the new Microsoft ? this can't be good... Jim On 14/06/13 19:18, Clinton Dreisbach wrote: I think that's more like Linux is the predominant OS among people who love to talk about their OS. In my experience, there's a lot more Mac users than any other

[ANN] Pedestal 0.1.9 has been released

2013-06-14 Thread Ryan Neufeld
Hey Folks, We've just released the 0.1.9 versions of the Pedestal libraries. This release is mostly bug fixes and usability improvements. Notable changes include better change reporting for nil/falsy values in pedestal-app dataflow and unification of what command starts a pedestal app or

Re: Database migrations

2013-06-14 Thread Geraldo Lopes de Souza
Are you married with a database ? If so, make migrations with your database sql language. http://mybatis.org/migrations/ If that is the case Idiomatic migrations adds no value imho. On Friday, June 14, 2013 1:24:39 PM UTC-3, Reginald Choudari wrote: Hello all, I am trying to implement

Re: Database migrations

2013-06-14 Thread Reginald Choudari
That is a good point. But another reason I wanted to do migrations through the application code was to automagically run migrations when the app was initially run, i.e. do a lein ring server-headless and it will automatically run migrations in order to start the web-app. On Friday, June 14,

Re: In what OS do you code?

2013-06-14 Thread Yves S. Garret
Truthfully, they're not shy when it comes to things such as DRM, closing off previous more open standards/software and just don't really give back to the OSS community as much as they take. I own a Mac mini and I'm so-so satisfied with it. In Ubuntu, I love it in comparison. On Fri, Jun 14,

[GSOC] Constructing Algebraic Expressions - User api

2013-06-14 Thread Maik Schünemann
Hi, I discussed general design issues for expresso before, but the (for you) most important part - the user api - was left out. I have written a blog posthttp://kimavcrp.blogspot.de/2013/06/constructing-algebraic-expressions.html about what is the most seamless way to use expresso and

Re: In what OS do you code?

2013-06-14 Thread Colin Fleming
I use OSX for everything, and have for a long time. I could see myself switching to Linux for work (although collaboration tools e.g. Skype etc are still more difficult than on OSX, maybe hangouts helps here) but at home it's a non-starter since I use my machine for watching movies etc, and that's

Re: In what OS do you code?

2013-06-14 Thread Mikhail Kryshen
Yves S. Garret yoursurrogate...@gmail.com writes: Truthfully, they're not shy when it comes to things such as DRM, closing off previous more open standards/software and just don't really give back to the OSS community as much as they take. I think it would be naive to expect ethical behaviour

Re: Database migrations

2013-06-14 Thread Juha Syrjälä
There are also following libraries to handle migrations: Ragtime: https://github.com/weavejester/ragtime Lobos: https://github.com/budu/lobos Lobos has its own DSL to implement database manipulation. Ragtime uses normal Clojure functions instead. On Friday, June 14, 2013 7:24:39 PM UTC+3,

Re: Database migrations

2013-06-14 Thread Alex Baranosky
Inspired by Technomancy's suggestion to try a simpler approach to migrations on IRC, I came up with this tiny library based heavily on code from the clojars repo, that Phil pointed me to. Personally, I thought Ragtime and Lobos, were overkill.

Re: Clojure generates unnecessary and slow type-checks

2013-06-14 Thread Mikhail Kryshen
JIT will probably remove unnecessary checkcast instructions. What looks suspicious to me is that i and asize are converted to longs (notice i2l opcodes). I noticed earlier that loops with long counters are measurably slower for the same number of iterations (probably, HotSpot does not apply some

Re: Database migrations

2013-06-14 Thread Korny Sietsma
We used drift for a while, but found it didn't add much over plain sql, and was forcing us to write down migrations, which imho are a mistake. We ended up moving to Flyway, a very straightforward Java migration library, with a thin clojure wrapper. This has the advantages of using plain sql

Re: In what OS do you code?

2013-06-14 Thread Yves S. Garret
Mikhail, you do have a point there. On Fri, Jun 14, 2013 at 6:48 PM, Mikhail Kryshen mikh...@kryshen.netwrote: Yves S. Garret yoursurrogate...@gmail.com writes: Truthfully, they're not shy when it comes to things such as DRM, closing off previous more open standards/software and just

[ANN] Pedestal 0.1.9 has been released

2013-06-14 Thread Daniel
Awesome, thanks for the hard work. I imagine this will require some updates to the getting started page. I'm in the process of learning how to use pedestal right now. Besides the website and sample projects on github, are there any other good resources for learning? -- -- You received this

Re: Database migrations

2013-06-14 Thread Ken Restivo
Migratus seems to be pretty similar to this, is a nice small library. I've used it and it works well. https://github.com/pjstadig/migratus -ken -- On Fri, Jun 14, 2013 at 11:44:08AM -0500, Steven Degutis wrote: Phil uses this really cool trick:

Re: Database migrations

2013-06-14 Thread Dave Della Costa
Coming from the Rails world, for a while I searched for a way to do this, and at this point I've come to the conclusion that * raw SQL migrations are the way to go * rollback/down migrations are problematic for environments other than test. Regarding specific experiences, I used Lobos for a

Text editor plugins and REPL

2013-06-14 Thread JvJ
I'm currently writing an interactive application (game programming environment) that can be controlled by commands from the REPL. However, I'm wondering what it would take to integrate commands into the text editor itself, or to allow the editor to be controlled to a certain extent by the