Re: Laziness in filter

2013-03-17 Thread dennis zhuang
Yep,it's chunked sequence,just like batch processing. You can use the seq1 function in fogus blog. 2013/3/17 Evan Mezeske emeze...@gmail.com I'd guess that what you're seeing is related to chunked sequences: http://blog.fogus.me/2010/01/22/de-chunkifying-sequences-in-clojure/ . On Sunday,

Re: Why is this code so slow?

2013-02-03 Thread Dennis Haupt
without looking at the code: ranges in scala have been optimized in i think 2.10 to be able to be inlineable completely when you iterate over them. at runtime, it *should* be equal to a simple while loop and a counter variable Am 03.02.2013 14:28, schrieb Jules: The Scala version is probably

Re: is intellij idea a good ide for clojure development?

2013-01-29 Thread Dennis Haupt
i don't know emacs, so i would like to know as well what the killer features are that make you more productive with emacs 2013/1/29 Laurent PETIT laurent.pe...@gmail.com Hello Jay, I'd like to learn a little bit more from what makes you prefer emacs over IntelliJ. As the main developer of

Re: is intellij idea a good ide for clojure development?

2013-01-29 Thread Dennis Haupt
Am 29.01.2013 23:05, schrieb Phil Hagelberg: Jay Fields writes: On Tue, Jan 29, 2013 at 11:45 AM, Laurent PETIT laurent.pe...@gmail.com wrote: Hello Jay, I'd like to learn a little bit more from what makes you prefer emacs over IntelliJ. As the main developer of Counterclockwise, I'm

is intellij idea a good ide for clojure development?

2013-01-28 Thread Dennis Haupt
the only ides i have used so far for clojure are intellij idea and netbeans. is there one that is a lot better? if yes, why? i am not interested in details or single features, i just want to know if there is some magic editor out there that i should look into because it is *obviously a lot* better

Re: why is nth called here?

2012-12-12 Thread Dennis Haupt
if anyone is interested, i used reduces instead of reductions. 2012/12/11 Dennis Haupt d.haup...@gmail.com i just saw my error :/ Am 11.12.2012 22:22, schrieb Ben Wolfson: nth is called in doing the destructuring for the argument lists in your fns defined in try-find-sequence

max doesn't return max?

2012-12-12 Thread Dennis Haupt
maybe i am blind, but why does max return the complete lazy seq here instead of the maximum number? if i just print as-products, i get a list of numbers. (count solution) tells me there are 1000+ and yet max gives me the complete list? (ns euler.Problem8) (def digits

why is nth called here?

2012-12-11 Thread Dennis Haupt
i am trying to solve euler problem 125. when i tested this code: (ns euler.Problem125) (defn is-palindrome [n] (let [s (str n)] (= (seq s) (reverse s (defn to-check [] (filter is-palindrome (range 1 1000))) (defn square-root [n] (Math/sqrt n)) (defn squared [n] (* n n)) (defn

Re: why is nth called here?

2012-12-11 Thread Dennis Haupt
i just saw my error :/ Am 11.12.2012 22:22, schrieb Ben Wolfson: nth is called in doing the destructuring for the argument lists in your fns defined in try-find-sequence. On Tue, Dec 11, 2012 at 1:20 PM, Dennis Haupt d.haup...@gmail.com wrote: i am trying to solve euler problem 125

Re: help choosing dev environment for clojure

2012-11-25 Thread Dennis Haupt
can you give a few examples that should convince a lot of people on the spot? Am 25.11.2012 17:57, schrieb Jay Fields: I spent 3 years doing Clojure (for prod apps) in IntelliJ. 3 months ago I switched to emacs - and would never go back. If the idea of customizing your dev environment to

Re: Efficiency of Dijkstra's algorithm

2012-11-21 Thread Dennis Haupt
i used a java priorityqueue for this. it's mutable (but local), and since you're not going to access he queue with more than in thread you can hide this fact and still pretend to be functional. i did it. in reality, cheats are always allowed. 2012/11/21 Sergey Didenko sergey.dide...@gmail.com

Re: Clojure to Haskell Compiler

2012-11-17 Thread Dennis Haupt
why not just use haskell instead? i doubt you can just convert the code Am 17.11.2012 19:31, schrieb Ahmed Shafeeq Bin Mohd Shariff: Hi guys, I've been frustrated with Clojure's slow speed on the JVM. I've been thinking of how it can be compiled to native and I feel that compiling

Re: Question about doseq

2012-10-30 Thread dennis zhuang
Please use prn insteadof println. By default, pr and prn print in a way that objects can be read by the reader,but print and println produce output for human consumption. 2012/10/31 arekanderu arekand...@gmail.com Hello all, I have the following code: (def my-hash {1 {:a-key {:value a

Re: Clojure : a good start for non-programmers?

2012-09-25 Thread Dennis Haupt
basically anything except brainfuck is a good idea :) Am 26.09.2012 06:45, schrieb Leonardo Borges: Hi Gregorius! I think Clojure is a great way to start to learn to program! Clojure is a flavour of lisp and so is Scheme - which has been used for decades to teach programming to MIT

Re: language shootout / the phonecode study

2012-09-23 Thread Dennis Haupt
i did not need the hint to develop a correct solution. the hint just clarifies what could have been misunderstood. Am 23.09.2012 21:03, schrieb Mark Engelberg: I agree that Odersky's version doesn't match the spec. Hint or no hint, it doesn't look like he even attempts to address the issue of

Re: language shootout / the phonecode study

2012-09-22 Thread Dennis Haupt
here's my solution: https://gist.github.com/3766508 the original (done in 2 hours) solution is commented out. i made some improvements and solved the whole thing in 39 lines (counting only the content of main). doing it in the minimal amount of lines was not my goal. i was trying to minimize the

Re: language shootout / the phonecode study

2012-09-22 Thread Dennis Haupt
, schrieb David Nolen: On Sat, Sep 22, 2012 at 11:27 AM, Dennis Haupt d.haup...@gmail.com mailto:d.haup...@gmail.com wrote: here's my solution: https://gist.github.com/3766508 the original (done in 2 hours) solution is commented out. i made some improvements and solved

language shootout / the phonecode study

2012-09-20 Thread Dennis Haupt
i stumbled upon this: http://page.mi.fu-berlin.de/prechelt/phonecode/ the results: http://page.mi.fu-berlin.de/prechelt/Biblio/jccpprt_computer2000.pdf summary: concise languages bashed c, c++ and java if you look at the time needed to complete the program. however, in 1999, there were no good

Re: language shootout / the phonecode study

2012-09-20 Thread Dennis Haupt
, fixing and so on) i'll have to think about that 2012/9/20 David Nolen dnolen.li...@gmail.com On Thu, Sep 20, 2012 at 10:52 AM, Dennis Haupt d.haup...@googlemail.comwrote: i stumbled upon this: http://page.mi.fu-berlin.de/prechelt/phonecode/ the results: http://page.mi.fu-berlin.de/prechelt

Re: language shootout / the phonecode study

2012-09-20 Thread Dennis Haupt
PM UTC+2, David Nolen wrote: On Thu, Sep 20, 2012 at 10:52 AM, Dennis Haupt d.ha...@googlemail.com javascript: wrote: i stumbled upon this: http://page.mi.fu-berlin.de/prechelt/phonecode/ http://page.mi.fu-berlin.de/prechelt/phonecode/ the results

Re: language shootout / the phonecode study

2012-09-20 Thread Dennis Haupt
i came to a correct solution without that hint :) just like in reality, i started coding without reading the spec. a few surprises came along the way (what? they want it like this? they just added this to mock me!) i spent about 50% of the time writing code and 50% thinking about it. i'll tell my

Re: 'functional' performance VS 'imperative' complexity

2012-08-25 Thread Dennis Haupt
+1 i stay functional if possible and fall back to mutable on isolated, performance critical spots if i can't get it done fast enough in a purely functional way. i solved the move-mess-up-everything problem by forcing a move to implement both apply and unapply on a game board. (it was a java

Re: real-world usage of reducers?

2012-08-21 Thread Dennis Haupt
i assume you are coming from a java background? if so, every time you wrote this: Result result = null; for (Stuff s:stuffList) { if (result ==null) result = ... result.cuddleWith(s); } return result a reducer would have been a functional alternative to this Am 21.08.2012 13:04, schrieb Jim -

Re: Why does (conj (transient {}) {}) fail with CCE?

2012-08-09 Thread dennis zhuang
you must use conj! instead of conj. 在 2012-8-9 PM8:49,Jacek Laskowski ja...@japila.pl写道: Hi, I've been digging into the sources of Clojure and found frequencies. There's the transient function and I thought I'd use it with a map and conj. Why does this fail? user= (conj {} {:y 1}) {:y 1}

Re: [ANN] Okku 0.1.0 - Akka interface for Clojure

2012-07-21 Thread dennis zhuang
Great work.Thanks. 2012/7/20 Gary Verhaegen gary.verhae...@gmail.com Okku is a thin wrapper around the Akka library that makes it easy to use it from Clojure. The Actor model can be considered a nice alternative for concurrent programming, but it really shines when you want to distribute

Re: [ANN] Okku 0.1.0 - Akka interface for Clojure

2012-07-21 Thread dennis zhuang
I try to run okku-pi,but it could not find okku 0.1.1-SNAPSHOT: Could not find artifact org.clojure.gaverhae:okku:jar:0.1.1-SNAPSHOT in clojars (https://clojars.org/repo/) Should i use 0.1.0? 2012/7/21 dennis zhuang killme2...@gmail.com Great work.Thanks. 2012/7/20 Gary Verhaegen

Re: {ANN} ring.velocity: render apache velocity templates for ring in clojure.

2012-07-19 Thread dennis zhuang
美味书签 http://mei.fm On Wed, Jul 18, 2012 at 11:59 AM, dennis zhuang killme2...@gmail.com mailto:killme2...@gmail.com wrote: 其实就是几行代码封装下,**我觉的velocity比什么enlive好用多了。 2012/7/18 Shen, Feng shen...@gmail.com mailto:shen...@gmail.com 不错不错。 velocity 在java中用得较广

Re: {ANN} clojure-control 0.4.1 released.

2012-07-18 Thread dennis zhuang
a simple bash script to run them. 2012/7/18 Murtaza Husain murtaza.hus...@sevenolives.com http://palletops.com/ On Wednesday, July 18, 2012 11:41:11 AM UTC+5:30, dennis wrote: I am sorry,i don't know pallet,any links? thanks. 2012/7/18 Murtaza Husain murtaza.husain@sevenolives

Re: why does Clojure need to cache keywords?

2012-07-18 Thread dennis zhuang
Compare keywords can be very fast. 在 2012-7-18 PM4:51,jaime xiejianm...@gmail.com写道: Hello, When I read the source code keyword, say, Keyword.java (V1.3), I found that when we intern a keyword, (if I understand it correctly) it uses a cache for keywords:

Re: why does Clojure need to cache keywords?

2012-07-18 Thread dennis zhuang
to compare with each other (or other objects), it means it's Symbol's interned strings(ns name) make the comparison fast but not this caching stuff. I found a find() method in source code but not sure if the cache is relevant to this method. 在 2012年7月18日星期三UTC+8下午4时52分25秒,dennis写道: Compare

{ANN} ring.velocity: render apache velocity templates for ring in clojure.

2012-07-17 Thread dennis zhuang
[render]]) Use render function to render template with vars: (render test.vm :name dennis 29) The test.vm will be interpreted equals to: hello,dennis,your age is 29. Use ring.velocity in compojure: (defroutes app-routes (GET / [] (render test.vm :name dennis :age 29)) (route

Re: {ANN} ring.velocity: render apache velocity templates for ring in clojure.

2012-07-17 Thread dennis zhuang
A little error in getting started missing :age (render test.vm :name dennis :age 29) 2012/7/17 dennis zhuang killme2...@gmail.com Hi,all Apache velocity http://velocity.apache.org/is a great java template engine used widely. I want to use it in clojure with compojure and ring

Re: {ANN} ring.velocity: render apache velocity templates for ring in clojure.

2012-07-17 Thread dennis zhuang
其实就是几行代码封装下,我觉的velocity比什么enlive好用多了。 2012/7/18 Shen, Feng shen...@gmail.com 不错不错。 velocity 在java中用得较广。 这样为potential 的 clojure用户铺了一下道路。 沈锋 美味书签 http://meiwei.fm http://mei.fm On Wed, Jul 18, 2012 at 12:00 AM, dennis zhuang killme2...@gmail.comwrote: A little error in getting started

{ANN} clojure-control 0.4.1 released.

2012-07-17 Thread dennis zhuang
Clojure-control https://github.com/killme2008/clojure-control is a clojure tool library to execute user defined tasks on remote machines grouped into cluster just like fabric in python or node-control in node.js. *Home*: https://github.com/killme2008/clojure-control Control 0.4.1 released,it has

Re: Why :inline have to define the function twice?

2012-07-16 Thread dennis zhuang
function without repetition. --Aaron On Sun, Jul 15, 2012 at 10:43 PM, dennis zhuang killme2...@gmail.comwrote: Inline a function in clojure is easy,just define a :inline form to meta map and it will be inlined into the form which calls it.For example,the pos? function in clojure.core: (defn pos

Re: Why :inline have to define the function twice?

2012-07-16 Thread dennis zhuang
Thanks. Yeath,i know the defline macro,and it is the best way to define inline function.I got your point,thanks. 2012/7/17 Aaron Cohen aa...@assonance.org On Mon, Jul 16, 2012 at 11:26 AM, dennis zhuang killme2...@gmail.com wrote: Yes, thank you for your reply,i total agree with you about

Re: Buggy FP behavior with Clojure 1.3

2012-06-25 Thread dennis zhuang
user= Double/MAX_VALUE 1.7976931348623157E308 2012/6/26 Sean Corfield seancorfi...@gmail.com On Mon, Jun 25, 2012 at 9:19 PM, Cedric Greevey cgree...@gmail.com wrote: user= 1e309 Infinity FWIW, on 1.4.0 I get: user= 1e309 CompilerException java.lang.RuntimeException: Unable to

Re: Buggy FP behavior with Clojure 1.3

2012-06-25 Thread dennis zhuang
Added a postfix M to make the number as BigDecimal or N as a BigInteger: user= 1e308M 1E+308M user= (class 1e308M) java.math.BigDecimal user= (* 10.0 1e108M) 1.0E109 2012/6/26 Cedric Greevey cgree...@gmail.com On Tue, Jun 26, 2012 at 1:11 AM, Sean Corfield seancorfi...@gmail.com wrote: On

{ANN} clj.monitor: monitoring applications in clojure

2012-05-12 Thread dennis zhuang
Hi,all I've implemented a simple DSL for monitoring apps in clojure based on SSH. Usage: goog_1871645686https://github.com/killme2008/clj.monitor An example: (defcluster mysql :clients [{:user deploy :host mysql.app.com}]) (defmonitor mysql-monitor ;;Tasks to monitor

Re: {ANN} Clojure-control 0.3.4 released

2012-05-10 Thread dennis zhuang
*A new release 0.3.5:* --Now you can run a task with user@host rather than a pre-defined cluster by: lein control run user@host task args *Upgrade:* lein plugin install control 0.3.5 2012/5/10 dennis zhuang killme2...@gmail.com Clojure-control: a clojure DSL for system admin

Re: {ANN} Clojure-control 0.3.4 released

2012-05-10 Thread dennis zhuang
I am sorry, 0.3.5 will break the example with only :clients in cluster. I've push 0.3.6 to clojars, upgrade control by: lein plugin install control 0.3.6 Sorry for this issue,thanks. 2012/5/11 Rostislav Svoboda rostislav.svob...@gmail.com I took the steps from your README.md and it seems

{ANN} Clojure-Control 0.3.3 release

2012-04-30 Thread dennis zhuang
Clojure-control: a clojure DSL for system admin and deployment with many remote machines via ssh Usage: https://github.com/killme2008/clojure-control *Release 0.3.3* - New function (set-options! key value) to set global options,include keys :ssh-options,:scp-options,:rsync-options and :user

Re: Inconsistent refs within an STM transaction.

2012-04-16 Thread dennis zhuang
Hi Transaction read point is changed every time when transaction is started or retried.So the result is all right.If you want the ref1 cloud not be modified by other transactions ,you can use ensure: (defn deref-delay-deref [ref1 ref2 delay] (.start (Thread.

Re: question about partial

2012-04-16 Thread dennis zhuang
user= (defn f[x y] (+ x y)) #'user/f user= (- 3 ((partial f 2))) 5 It must works :). Please notice the extra parentheses. 2012/4/17 larry larrye2...@gmail.com On Monday, April 16, 2012 10:02:48 AM UTC-7, Cedric Greevey wrote: (- 3 ((partial f 2))) should also work. I just wrote that it

Re: seeking a lazy way to interleave a constant

2012-04-09 Thread dennis zhuang
D o you want this? user= (def x (interleave (iterate inc 1) (repeat 0))) #'user/x user= (take 10 x) (1 0 2 0 3 0 4 0 5 0) 2012/4/10 Andrew ache...@gmail.com Given a lazy sequence of numbers is there a way to interleave a constant and get another lazy sequence? Say the first sequence is 1 2 3 4

Re: Boolean

2012-04-07 Thread Dennis Haupt
why is there an exception for Boolean.FALSE? Am 07.04.2012 17:28, schrieb Softaddicts: Hi, You are not in the Clojure play ground when you use (Boolean. false). This expression creates a Java object, hence (if any-java-object ...) always evaluate the true branch in Clojure. In Clojure,

Re: Boolean

2012-04-07 Thread Dennis Haupt
i've never seen a new Boolean(...) in my 10 years of developing java code. Am 07.04.2012 22:49, schrieb Michael Klishin: Steven Obua: (if (Boolean. false) jesus christ) will return jesus, not christ. Googling this on the net, I found that this is a known phenomenon

{ANN}Clojure-Control 0.3.2 is out

2012-03-24 Thread dennis zhuang
Hi,all I am pleased to announce that clojure-control 0.3.2 is out.Clojure-control is a clojure DSL for system admin and deployment with many remote machines via ssh.Please see https://github.com/killme2008/clojure-control Main highlights in 0.3.2: 1.You can include other clusters in

Re: Clojure Toolbox

2012-03-24 Thread dennis zhuang
Another link http://cnlojure.org/open.html 2012/3/24 Rostislav Svoboda rostislav.svob...@gmail.com A nice list of tools and libraries I stumbled upon. Enjoy! http://www.clojure-toolbox.com/ -- You received this message because you are subscribed to the Google Groups Clojure group. To

Re: Parallel SSH and system monitoring in Clojure

2012-03-15 Thread dennis zhuang
There is a clojure-control: https://github.com/killme2008/clojure-control 2012/3/16 Chris McBride cmm7...@gmail.com Hi, I releases two simple clojure libraries to help running commands via SSH on multiple servers. Hopefully someone will find it useful.

{ANN} Clojure-Control 0.3.0 is out

2012-02-18 Thread dennis zhuang
Hi,all Clojure-control https://github.com/killme2008/clojure-control is a clojure DSL for system admin and deployment with many remote machines via ssh. I am pleased to annoucment that clojure-control 0.3.0 is out.It adds some powerful features in this release ,includes: - ssh and scp

Re: Problem with amap over byte arrays

2012-02-16 Thread dennis zhuang
Because bit-xor returns a integer,so you have to cast it to byte: (amap ^bytes an-array idx ret (byte (bit-xor (byte 0) (aget ^bytes an-array idx 2012/2/17 Andreas Kostler andreas.koestler.le...@gmail.com Hi all, I'm experiencing the following problem: (def an-array

{ANN} clojure-control 0.2.4 is out

2012-02-13 Thread dennis zhuang
Hi,all Clojure-control is a clojure DSL for system admin and deployment with many remote machines via ssh,and i have checked out a branch to make it work with clojure 1.3 now. At last, control 0.2.4 works well with clojure 1.3,and 0.2.3 works well with clojure 1.2:

Re: Best IDE

2012-01-20 Thread Dennis Peterson
That third trick works in standard vim when you type da(...except you don't have to be on the opening paren, you can be anyplace within the sexp (as long as you're not within a smaller sexp, in which case you'll get that one.) A couple quick macros can handle the other two. If those three are the

Re: Best IDE

2012-01-19 Thread Dennis Haupt
. On Wed, Jan 18, 2012 at 4:00 PM, Dennis Haupt d.haup...@googlemail.com wrote: when i say debugging, i mean inspect fields and evaluate expressions. i attached a screenshot of all i get: a useless stacktrace and no variables. how do you debug? Am 18.01.2012 21:29, schrieb Jay

Re: are non programmers the better programmers?

2012-01-18 Thread Dennis Haupt
let's call it the biased experience effect. if there are 20 ways to solve a problem, and you just know 3 of them, you are a hammer and the problem looks like a nail. if you have a broader knowledge, you can pick a more appropriate solution. what i claim is that if you know NO solutions, the one

Re: Best IDE

2012-01-18 Thread Dennis Haupt
there is no really good ide (analysis, error highlighting, debugging) Am 18.01.2012 17:18, schrieb Jay Fields: Use emacs, if you want the path of least resistance for writing pure clojure code. You'll have the most support from the community. Use whatever IDE you already use for Java, if you

Re: Best IDE

2012-01-18 Thread Dennis Haupt
Am 18.01.2012 21:10, schrieb Sean Corfield: On Wed, Jan 18, 2012 at 10:42 AM, Dennis Haupt d.haup...@googlemail.com wrote: there is no really good ide (analysis, error highlighting, debugging) Hmm, I have error highlighting and debugging. Not sure what you mean by analysis. call hierarchy

Re: Sorry Don't understand for macro, a bug or a newbie-question??

2012-01-18 Thread dennis zhuang
for returns a lazy sequence.You may prefer doseq: (defn fortest2 [] (doseq [a (range 2 10) b (range 2 10)] (do (println x: a b: b) (list a b))) (println ende) ) (fortest2) doseq will be forced for side-effects. 2012/1/19 Jack Moffitt j...@metajack.im doesn't show any

are non programmers the better programmers?

2012-01-17 Thread Dennis Haupt
after the wtfs have worn off a bit, go on reading. imagine a simple problem: you have a collection of numbers and you have to write a function which collects all the numbers that are contained uneven times. for example, for a collection (1,2,3,2,3,4) the correct result is (1,4) ask a child: you

Re: are non programmers the better programmers?

2012-01-17 Thread Dennis Haupt
Am 17.01.2012 22:17, schrieb Cedric Greevey: On Tue, Jan 17, 2012 at 3:46 PM, Dennis Haupt d.haup...@googlemail.com wrote: after the wtfs have worn off a bit, go on reading. imagine a simple problem: you have a collection of numbers and you have to write a function which collects all

Re: are non programmers the better programmers?

2012-01-17 Thread Dennis Peterson
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.— C.A.R. Hoare. On Tue, Jan 17, 2012 at 3:46 PM, Dennis Haupt d.haup

Re: are non programmers the better programmers?

2012-01-17 Thread Dennis Haupt
Am 17.01.2012 22:46, schrieb James Reeves: On 17 January 2012 20:46, Dennis Haupt d.haup...@googlemail.com wrote: i've noticed this since i started to work as a programmer 10 years ago. programmers in general are supposed to be good at finding simple solutions, but my experience

Re: are non programmers the better programmers?

2012-01-17 Thread Dennis Haupt
Am 17.01.2012 23:08, schrieb daly: On Tue, 2012-01-17 at 21:46 +0100, Dennis Haupt wrote: after the wtfs have worn off a bit, go on reading. imagine a simple problem: you have a collection of numbers and you have to write a function which collects all the numbers that are contained uneven

Re: A STM profile tool

2012-01-16 Thread dennis zhuang
hi,all I've upgraded the version to 1.0.1-SNAPSHOT. And added a new function ref-stats to get the statistics information of a reference.For example: =(use'stm) =(def a (ref 1)) =(def b (ref 2)) =(dotimes [_ 100] (future (dosync (alter a + 1) (alter b - 1 =@a 101 =@b -98 =(stm-stats) {(alter

Re: i am so bored

2012-01-15 Thread Dennis Haupt
details, etc. Right now you cannot even stat a file from clojure without calling the stat command from a shell. :/ --- Joseph Smith j...@uwcreations.com (402)601-5443 On Jan 14, 2012, at 6:12 AM, Dennis Haupt d.haup...@googlemail.com wrote: hi there, i am looking for something

i am so bored

2012-01-14 Thread Dennis Haupt
hi there, i am looking for something to do, preferably something that makes me rich, but that is not a must have - if it's interesting, i'll code for free. i can offer almost 15 years of coding experience (important: while being open minded the whole time). i am a one man army, if you will :)

Re: converting a string to a list

2012-01-14 Thread dennis zhuang
You can do this ((comp #(map str %) seq) abcdef) (a b c d e f) 2012/1/15 Bruce Durling b...@otfrom.com Sam, Strings can be turned into sequences with seq. (seq foo) (\f \o \o) The backslashes are because f o and o are character literals. cheers, Bruce On Sat, Jan 14, 2012 at

A STM profile tool

2012-01-14 Thread dennis
I written a profile tool for clojure STM,it statistics all transactions information such as execution times,execution cost,the retry reason and times etc. If you are interested in it,please check it on github: https://github.com/killme2008/stm-profiler It's just a try to profile STM,if you have

Re: i am so bored

2012-01-14 Thread Dennis Haupt
app from it at some point, but I am starting to realize I am not good enough to do the whole thing by myself, hence that email. Looking forward to have a reply from you, Sam On Sat, Jan 14, 2012 at 12:12 PM, Dennis Haupt d.haup...@googlemail.com mailto:d.haup...@googlemail.com wrote

Re: want to make a 'debug' function, how to get current source and line number?

2011-12-15 Thread Dennis Haupt
in java i would throw an exception and parse its stack trace. don't know how to do that in clojure, but probably similar Am 15.12.2011 06:48, schrieb jaime: Hello there, I want to write a function named debug which will print out date- time msg + current source-line + etc. info, but I don't

Re: Problem with Korma and clj-soap

2011-11-28 Thread Dennis Crenshaw
Eeyup, that seems to do the trick! It complains about proper initialization and Axis2 no longer logs to stdout, but I can serve soap again! I now just need to find a way to harmonize the logging from Korma and the logging that Axis2 provides. But that's an exercise left to the OP. :) Thanks for

Re: Problem with Korma and clj-soap

2011-11-28 Thread Dennis Crenshaw
For the for the record and in case anyone has run into something similar, I've fixed my problem and come to an understanding of it's nature... First, the why: As it turns out, Axis2, et. al defaults to yelling on the DEBUG log4j level for it's activity logs. Thus, if the root appender says DEBUG

Problem with Korma and clj-soap

2011-11-25 Thread Dennis Crenshaw
So I'm trying to create a drop-in implementation of a SOAP webservice with Clojure. Naturally I look into libraries that accomplish the different bits. I need something to do SQL work with a relational db (Kormahttps://github.com/ibdknox/korma, check!) and I need to present a SOAP interface

Re: Clojure-in-CommonLisp?

2011-11-15 Thread Dennis Crenshaw
I haven't dealt with CL in quite a while, but there is this (which I was involved with in my undergrad at CofC): http://clforjava.org/ CLforJava may be helpful since it is, a totally new version of the Common Lisp language that runs on the Java Virtual Machine and is intertwined with the Java

Re: SQL Korma Missing Pred

2011-11-09 Thread Dennis Crenshaw
So it does, thanks! -- 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,

SQL Korma Missing Pred

2011-11-08 Thread Dennis Crenshaw
with a ticket. Thanks, Dennis -- 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

Re: problems of a newbie

2011-11-07 Thread Dennis Haupt
The main thing to keep in mind is that when coming from java/scala, you'll have a hard time adjusting to clojure, and you're making it harder by trying something so inherently full of state. I understand the need to tackle problems that we like, but without a good understanding of the

Re: problems of a newbie

2011-11-07 Thread Dennis Haupt
In his code I did notice he doesn't use destructing very much. where would that have been useful? -- 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

Re: problems of a newbie

2011-11-07 Thread Dennis Haupt
Am 07.11.2011 10:18, schrieb Dennis Haupt: In his code I did notice he doesn't use destructing very much. where would that have been useful? defn x [{:keys [foo bar]} param] instead of defn x [param] (let [foo (:foo param)...]) ? -- -- You received this message because you

Re: Another newbie question

2011-11-07 Thread Dennis Haupt
Am 06.11.2011 12:56, schrieb pron: Hi. I'm new to Clojure, and enjoy using it very much. It's been years since I learned Scheme back in college, and it's a pleasure going back to lisp. I do, however, have a question regarding real-world Clojure use in large teams. While I clearly understand

Re: problems of a newbie

2011-11-07 Thread Dennis Haupt
Am 07.11.2011 08:00, schrieb Sean Corfield: On Sun, Nov 6, 2011 at 12:15 PM, Dennis Haupt d.haup...@googlemail.com wrote: if by compatible you mean has a specific set of functions and fields, then scala can do that without sacrificing static type safety: Yes, I started working with Scala

Re: problems of a newbie

2011-11-07 Thread Dennis Haupt
Am 07.11.2011 14:01, schrieb Milton Silva: On Nov 7, 12:41 pm, Milton Silva milton...@gmail.com wrote: On Nov 7, 9:14 am, Dennis Haupt d.haup...@googlemail.com wrote: The main thing to keep in mind is that when coming from java/scala, you'll have a hard time adjusting to clojure

Re: problems of a newbie

2011-11-07 Thread Dennis Haupt
Am 07.11.2011 14:02, schrieb Scott Jaderholm: On Mon, Nov 7, 2011 at 4:27 AM, Dennis Haupt d.haup...@googlemail.com mailto:d.haup...@googlemail.com wrote: Am 07.11.2011 10:18, schrieb Dennis Haupt: In his code I did notice he doesn't use destructing very much

Re: Another newbie question

2011-11-07 Thread Dennis Haupt
actually, we avoid dynamically typed languages like the plague. i am taking a peek at clojure because i'm curious. Am 07.11.2011 11:19, schrieb pron: I see. So namespaces are helpful here. What other team practices do you use? E.g. what do you use for effective documentation? With Java you

Re: anyone interested in a small game?

2011-11-06 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 30.10.2011 19:32, schrieb Dennis Haupt: hi community, i decided to create a (small) game in clojure to get a bit of non-theoretical experience. i'm pretty much a clojure noob (only did a few experiments) but have done a few real things

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
are that wanted. We have Common Lisp for quite some time now, and people seem quite happy with slime. Razvan On Nov 5, 2:16 pm, Dennis Haupt d.haup...@googlemail.com wrote: hi, i'm half done with my asteroids clone. i stumbled over a few problems and wanted to know how others already solved

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
from my iPad On 5 Nov 2011, at 12:16, Dennis Haupt d.haup...@googlemail.com wrote: hi, i'm half done with my asteroids clone. i stumbled over a few problems and wanted to know how others already solved them :) i am used to less concrete programming. i ask my tools to do the actual

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
be entirely defined by their inputs as oppose to being dependant on mutable state external to he function, in the most part. I am agreeing with you, and find these real world experiences incredibly useful. Sent from my iPad On 6 Nov 2011, at 13:03, Dennis Haupt d.haup...@googlemail.com

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
term. Later on the functionality will be rewritten in the new app. Exciting times! Sent from my iPad On 6 Nov 2011, at 16:49, Dennis Haupt d.haup...@googlemail.com wrote: special cases that depend on mutable state are evil. i avoid mutable states as much as possible, no matter which

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
Am 06.11.2011 19:06, schrieb Sean Corfield: On Sunday, November 6, 2011, Dennis Haupt d.haup...@googlemail.com mailto:d.haup...@googlemail.com wrote: this is a double edged sword. you *do* get it right *if* you think it through, but reality is often more complex than you assume. if you

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
Am 06.11.2011 20:56, schrieb Sean Corfield: On Sun, Nov 6, 2011 at 11:12 AM, Dennis Haupt d.haup...@googlemail.com wrote: let me guess: you had some classes that were used more than they should have been because they were the best match and introducing a better one would have taken more time

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
the clutter out. all i need is a big screen. :) but you're right, reading concise high level code reading verbose low level code On Nov 6, 2011 11:49 AM, Dennis Haupt d.haup...@googlemail.com mailto:d.haup...@googlemail.com wrote: special cases that depend on mutable state are evil. i avoid

Re: see if any branch of a cond succeeded

2011-11-05 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 what about (cond (= dir :left) ((move-left)(:ok)) (= dir :up) ((move-up)(:ok)) :else :nok) or whatever the exact syntax is Am 05.11.2011 08:22, schrieb Alan Malloy: On Nov 4, 11:49 pm, Baishampayan Ghose b.gh...@gmail.com wrote: On Sat, Nov 5,

problems of a newbie

2011-11-05 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi, i'm half done with my asteroids clone. i stumbled over a few problems and wanted to know how others already solved them :) i am used to less concrete programming. i ask my tools to do the actual analysis and coding for me: * where is that used?

Re: a better way to write this

2011-11-04 Thread Dennis Haupt
: (let [full-test (every-pred type-pred bounds-check contact)] ... On Nov 4, 9:51 am, Dennis Haupt d.ha...@googlemail.com wrote: (let [type-pred #() bounds-check #() contact #() full-test (fn [element] (and (type-pred element) (bounds-check element) (contact element)))] (filter full-test (:game

- vs - and names vs anonymous function

2011-11-02 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi there, i stumbled over two odd things 1) - and - have the same source code. why is that? 2) why can't i use (- hi #(println %)) directly? why do i have to put my function into a symbol first? is there a way to avoid this? (let [dummy #(println

Re: - vs - and names vs anonymous function

2011-11-02 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 thx *note: use macroexpand next time* Am 02.11.2011 10:58, schrieb Jonas: On Wednesday, November 2, 2011 11:37:32 AM UTC+2, HamsterofDeath wrote: hi there, i stumbled over two odd things 1) - and - have the same source code. why is that?

Re: anyone interested in a small game?

2011-11-01 Thread Dennis Haupt
it is absolutely necessary. Spread environmental awareness. On Mon, Oct 31, 2011 at 12:02 AM, Dennis Haupt d.haup...@googlemail.com wrote: hi community, i decided to create a (small) game in clojure to get a bit of non-theoretical experience. i'm pretty much a clojure noob (only did a few

Re: anyone interested in a small game?

2011-11-01 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 i went a step further: since my asteroids are all immutable, they don't contain a renderer. the renderer would either require a reference to the asteroids data, position, size and so on - if that changes the renderer would be obsolete - or would

<    1   2   3   >