Applying static java method to seq

2009-11-02 Thread Thomas
How come I can do this user=> (map #(Integer/parseInt %) ["42" "100"]) (42 100) but not this user=> (map Integer/parseInt ["42" "100"]) java.lang.Exception: Unable to find static field: parseInt in class java.lang.Integer (NO_SOURCE_FILE:2) I understand that Clojure is trying to look up Intege

Parsing parameters in clojure.core

2010-03-24 Thread Thomas
And why the magic number (three) of variables? Thomas -- 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 yo

Todo item annotation in Clojure.

2010-05-25 Thread Thomas
ssible to simply use lein todo to get the list of todos in a project. All feedback is very much appriciated. This was a thing I really missed in Clojure and I want to make it as good as possible. Thomas -- You received this message because you are subscribed to the Google Groups "Clojure&

Re: Todo item annotation in Clojure.

2010-05-26 Thread Thomas
Thanks to sids, the project now has lein todo functionality. -- 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 fi

Re: Todo item annotation in Clojure.

2010-05-27 Thread Thomas
ka: I must admit I use Emacs, and I wouldn't know how to integrate it into eclipse. If anybody else have any suggestions on how to accomplish this they are more than welcome to take a look or drop a line. Patrik: My bad, new jar uploaded. Have fun :D Thanks for the feedback! Thomas On M

Re: [ANN] byte-streams: a rosetta stone for all the byte representations the jvm has to offer

2013-07-02 Thread Thomas
I have already used this library and it is really really useful. Thanks Zach. Thomas -- -- 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

Re: Any Lispers in South Devon, UK?

2015-03-05 Thread Thomas
There are also a few of us in the Southampton/Winchester area Get in touch if you are interested. Thomas On Tuesday, 3 March 2015 21:53:57 UTC, Stephen Wakely wrote: > > Hi, > > Are there any other Lispers in South Devon who would be interested in > meeting up and talkin

Re: Support for IBM JVM?

2015-03-19 Thread Thomas
FYI: At IBM we are suppose to only the IBM JVM and not other version due to legal reason. Thomas -- 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 m

Scheduling state change?

2014-07-17 Thread Thomas
rious scheduling libraries (at-at, cronj and Quartzite), but from what I understand they don't support this behaviour, but please correct me if I am wrong. Thomas -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: Scheduling state change?

2014-07-21 Thread Thomas
he print out happen immediately, they are not scheduled. This is also the behaviour I got with the at-at library. I'd rather use something like the latter as it stops me from having mutable state inside my functions. Any ideas? Thomas -- You received this message because you are subscri

ring-transit issue

2014-11-28 Thread Thomas
ld have been Transit and the content-length is reported as 0 by postman. I am sure the error is between my ears ;) but I have no idea what!! Any ideas? TIA, Thomas -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Re: ring-transit issue

2014-12-02 Thread Thomas
app (-> app-routes (handler/site) (trans/wrap-transit-params) (trans/wrap-transit-response))) The change that made the difference seems to the the ring-response/response call in the get-data function. I hope that this helps other people and a big thank you to Ahmad for a hin

Please critique my code (barber problem with core.async)

2015-01-02 Thread Thomas
I use the two atoms as counters. I also wonder if there is a better way to time the ten seconds, something instead of the atom. So please critique the code below, any comments, improvements, obfuscations etc. are welcome!! Thomas (ns barber.core (:require [clojure.core.async :as async

Re: Please critique my code (barber problem with core.async)

2015-01-02 Thread Thomas
On Friday, 2 January 2015 16:45:14 UTC, Erik Price wrote: > > ;(async/timeout (* 10 1000)) ;; not sure why this doesn’t work here, > would make it portable to clojureScript I think > > Did you forget to use > e > .. :) thank you!!! Thomas -- You

Re: Please critique my code (barber problem with core.async)

2015-01-05 Thread Thomas
Thank you all for you valuable feedback. I really appreciate it and the suggestions are really good. Thomas -- 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 post

Re: Entity–component–system and Clojure

2017-08-16 Thread Thomas
If I am not mistaken Lightable uses it as well. There is also a plug in for it which helps with the ECS. Hope that helps. Thomas On Wednesday, 16 August 2017 02:52:38 UTC+2, Didier wrote: > > I recently stumbled upon the entity-component-system design pattern which > is popular in ga

Re: downloading of files from Dropbox using cli-http

2018-06-25 Thread Thomas
try and do a curl -v and see what it really does under the covers as there might be a redirect Good luck, Thomas On Monday, 25 June 2018 14:38:12 UTC+2, Johannes wrote: > > Hi, > > I am trying to download a file from Dropbox which I can get with the Http > request: > > P

Re: downloading of files from Dropbox using cli-http

2018-06-26 Thread Thomas
I have no idea what could be wrong here... sorry. Thomas On Monday, 25 June 2018 14:38:12 UTC+2, Johannes wrote: > > Hi, > > I am trying to download a file from Dropbox which I can get with the Http > request: > > POST /2/files/download Host: https://content.dropboxapi.c

Re: [ANN] Clojure 1.10 has been released!

2018-12-18 Thread Thomas
Thank you for this release and all the hard work everyone has put into this!!! Thomas On Monday, 17 December 2018 18:30:01 UTC+1, Alex Miller wrote: > > Clojure 1.10 focuses on two major areas: improved error reporting and Java > compatibility. > > > Error reporting at the RE

Re: [ANN] seancorfield/next.jdbc 1.0.0

2019-06-13 Thread Thomas
Thank you for all the hard work you put into this Sean!!! Great to see new libraries being written for Clojure!!! Thomas On Thursday, 13 June 2019 07:51:56 UTC+2, Sean Corfield wrote: > > The first “gold” release of the next generation of clojure.java.jdbc – a > new low-level Clojur

Re: Compare between clojure and Java

2016-01-05 Thread Thomas
more functionality. There are a few more examples around on the web I think. Thomas On Tuesday, 5 January 2016 13:27:10 UTC, Thomas Saillard wrote: > > Dear, > > In order to good understand the powerful of Clojure, > I have heard that compare to a code in java you need only few line

Re: [ANN] Clojure 1.8.0 is now available

2016-01-20 Thread Thomas
An extra big thank you for all involved!!! Thomas On Wednesday, 20 January 2016 13:22:28 UTC, Alex Miller wrote: > > The docs just haven't been regenerated yet - that's coming. > > -- You received this message because you are subscribed to the Google Groups "Cloj

Re: ANN replikativ 0.1.0 - strong eventual consistent P2P replication for clj and cljs

2016-01-20 Thread Thomas
Looks very interesting and I suspect there were some pretty hard problems to solve!!! Thank you for open sourcing this. Thomas -- 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

Re: [ClojureScript] Re: ANN replikativ 0.1.0 - strong eventual consistent P2P replication for clj and cljs

2016-01-22 Thread Thomas
nd Braid came to mind: https://github.com/braidchat/braid Maybe that is something we can show off some Clojure and ClojureScript. Haven't had time yet to look at this myself yet. Thomas -- You received this message because you are subscribed to the Google Groups "Clojure" group.

Re: Clojure IoT?

2016-04-11 Thread Thomas
I have made the Eclipse Paho JS client available for CLJS: https://github.com/cljsjs/packages/tree/master/paho And there is also machine head http://clojuremqtt.info/ Thomas On Saturday, 9 April 2016 23:39:05 UTC+1, Gregg Reynolds wrote: > > A very general question : is anybody other t

How to transform one data structure to another data structure?

2014-02-04 Thread Thomas
a lot more numbers. The order of things is not important. TIA, Thomas -- 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 pa

Comparing Regular Expression pattens for equality?

2014-02-26 Thread Thomas
se user=> (identical? #"test" #"test") false Not surprised that identical? doesn't work to be honest, but "=" should have worked IMHO Is there a way to do this? TIA Thomas -- You received this message because you are subscribed to the Google Gr

Re: Comparing Regular Expression pattens for equality?

2014-02-27 Thread Thomas
Thanks guys, Shame that it doesn't work that way. I've worked around it as suggested below. Thomas -- 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: Do I have to have knowlegde about Lisp

2014-03-10 Thread Thomas
don't want to spend any money (yet) Good luck and let us know how you get on. Thomas On Monday, March 10, 2014 2:41:12 PM UTC, Roelof Wobben wrote: > > Hello, > > I like the idea of Clojure but I wonder if I have to know a lot of Lisp to > work with Clojure. > > Wh

Re: Clojure Cookbook is out

2014-03-20 Thread Thomas
woooh More good books is good for Clojure. Going to order mine today. And a BIG BIG BIG thank you for everyone who has contributed, that is what I love about Clojure (almost ;) ) most, the community!!! Thomas On Thursday, March 20, 2014 1:15:57 PM UTC, Nando Breiter wrote: > > I

Re: [RFC] Roundtripping namespaced xml documents for data.xml

2014-05-21 Thread Thomas
Hi, Speaking of Clojure and XML, what is the preferred way of dealing with XML in Clojure these days? In the past I have used clojure.xml and clojure.zip. Is clojure.data.xml the best way to do this now? TIA, Thomas -- You received this message because you are subscribed to the Google

Re: [RFC] Roundtripping namespaced xml documents for data.xml

2014-05-22 Thread Thomas
Slightly Off topic, but how can I add new an element to an existing XML file with data.xml. For instance I have: and I want to add element to this like this: The documentation isn't particular clear on how to use the library unfortunately. Thomas -- You rec

Re: Past and future of data.generators

2014-06-05 Thread Thomas
Hi, I have used http://maths.uncommons.org/ in a few of my projects, so that could be used in data.random. I have also played with the random.org API in the past as a source of random numbers. Thomas ps. in one of my use cases I also care about the performance of the random generator as I

Re: ANN Introducing Machine Head, a Clojure MQTT client

2013-10-10 Thread Thomas
unlikely to be a problem. Thomas On Thursday, October 10, 2013 1:21:45 PM UTC+1, Mikera wrote: > > Hi Michael, > > This looks great - many thanks for sharing! > > Do you have any views / recommendations on an MQTT server/broker usable > from Clojure? Is that on the roa

Re: [ANN] Counterclockwise - Clojure plugin for Eclipse

2013-10-11 Thread Thomas
Great news Laurent Thank you for you work on this. I just installed it and I am going to use it later today!!! Merci, Thomas On Thursday, October 10, 2013 2:36:01 PM UTC+1, Laurent PETIT wrote: > > Hi, a new version of Counterclockwise, the Clojure plugin for the > Eclipse IDE,

Re: [ANN] Buffy The ByteBuffer Slayer, Clojure library to working with binary data

2013-11-30 Thread Thomas
Looks really really great and could you please explain how it differs from gloss [1]. Any advantages? Disadvantages? Thanks Thomas [1] https://github.com/ztellman/gloss On Friday, November 29, 2013 10:15:45 PM UTC, Alex P wrote: > > Buffy [1] is a Clojure library to work with Binar

Re: Suggestions for state modification improvements in this bit of code?

2013-11-30 Thread Thomas
eference?) > Clojurians ;) Thomas -- -- 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] Buffy The ByteBuffer Slayer, Clojure library to working with binary data

2013-12-04 Thread Thomas
Thank you Alex, I have been paying around with Gloss for a while now and realised it is not quite suitable for the protocol I am trying to en/decode. I'll give Buffy a try and see whether it is a better fit for my problem domain. Thanks again, Thomas On Monday, December 2, 2013 9:09:

Unexpected failure (split function)

2013-01-18 Thread Thomas
it works as expected. Surely this is unexpected (the REPL ending that is), but what about escaping the ; It is after all in a string and I wouldn't expect it to be seen as a comment. REPL-y 0.1.6 Clojure 1.4.0 Are my versions. TIA, Thomas -- You received this message because you are subscr

Re: Unexpected failure (split function)

2013-01-20 Thread Thomas
Tested this with Lein 2.0.0 and it works fine now. Thanks everybody for the quick response. Thomas On Friday, January 18, 2013 9:45:41 PM UTC, Andy Fingerhut wrote: > > Thanks, Chas. Sorry for the noise. > > I tested Thomas's bad case against the latest reply (version 0.1

Java interop with dynamic proxies

2013-03-12 Thread Thomas
the right code behind the covers. Any ideas how to do the equivalent in Clojure? (I figured out how to do the first line, but have tried various things for the second to no avail) TIA Thomas -- -- You received this message because you are subscribed to the Google Groups "Clojure" gr

Re: Java interop with dynamic proxies

2013-03-13 Thread Thomas
steriously for me). Thank in advance Thomas -- -- 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

Re: Java interop with dynamic proxies

2013-03-13 Thread Thomas
Not sure what I did previously different, but now it seems to work for me with the code snippet similar as the one above (And which I am sure I tried before as well). Thank you all for your help, Thomas -- -- You received this message because you are subscribed to the Google Groups "Cl

Re: JIT Compiler crash on IBM JDK 6

2013-03-26 Thread Thomas
Hi Paudi, Which particular version of the IBM JDK are you running (java -version) and have you checked if you are running the very latest version? Thomas -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, sen

Re: JIT Compiler crash on IBM JDK 6

2013-03-26 Thread Thomas
On Tuesday, March 26, 2013 3:19:08 PM UTC, Paudi Moriarty wrote: > > Hi Thomas, > > This is occuring on every Linux and AIX version I've tried, SR9, SR11 and > SR12. I tried Java 7 but it seems Clojure is very broken on IBM Java 7. > Getting ClassFormatErrors when buildi

Re: Mx - Algorithmic Composition on Clojure, core.logic & JMusic

2013-04-13 Thread Thomas
Hi Oscar, Looks, and sounds very interesting. Could you tell us a bit more about how it works please? Or some pointers into what the code does? Thanks, Thomas -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Re: growing a rest json/xml api

2013-04-26 Thread Thomas
this page seems to have an answer to your question: http://stackoverflow.com/questions/9657897/how-to-distinguish-html-vs-xhr-xml-json-requests-in-compojure-ring haven't tried it my self though. Thomas On Thursday, April 25, 2013 4:21:28 AM UTC+1, Jorge Urdaneta wrote: > > Hi, can y

Re: Colon (:) in comments?

2010-06-13 Thread Thomas
It is also possible to use the clj-todo module for annotating your code with todo items. http://github.com/tgk/clj-todo http://clojars.org/clj-todo Thomas On Jun 13, 4:13 pm, j-g-faustus wrote: > Hi, > > I get an exception whenever I put a colon in a multiline comment: > > (comm

Re: union using a comparison function

2010-09-05 Thread Thomas
I assume you have to vectors, v1 and v2, and you want to add all the elements from v1 that doesn't equal any element from v2 to v2. In that case you're probably best of using filter to extract the elements from v1 that are not equal to any element in v2. concat the result with v2. Thom

Re: Mapping a function to a map

2010-09-07 Thread Thomas
I've also been using my own version of a map-to-values function extensively and it would be really nice to have something like that, either in contrib or in core. It comes in handy surprisingly often. Best, Thomas On Sep 6, 5:40 pm, Nicolas Oury wrote: > Dear all, > > is there

Re: partition-starting-every : yet another partition function

2010-09-16 Thread Thomas
I agree with number 2: it would be very nice to have this in contrib. I needed it last month and rolled my own (less clean) version. Thomas On Sep 10, 10:26 pm, Matt Smith wrote: > problem: convert a collection [1 2 0 1 2 3 0 1 2 3 0 0 1 2] into > partitions like: > ((1 2) (0 1 2 3)

Using slurp to read changing JSON string

2011-06-06 Thread Thomas
ccessfully, but subsequent reads are the same, even though I know that the string has changed. What should I do differently? (I loop through the function with a bit of code from Rich Hickeys ants.clj) TIA Thomas -- You received this message because you are subscribed to the Google Groups "

Re: Using slurp to read changing JSON string

2011-06-10 Thread Thomas
clearer in the original post. Thomas On Jun 10, 9:03 am, Ivan Koblik wrote: > Hi Thomas, > > You need to execute this line: >   (dosync (ref-set location (read-json (slurp url > every time you want to re-query the string. > > To do this periodically you could do s

Re: Using slurp to read changing JSON string

2011-06-10 Thread Thomas
Hi Mark et al, I just tried your code and it does indeed work fine. It updates the time as expected. Not sure why my code isn't working as expect... a more investigating to do. Thomas ps. the web string won't start updating again until Monday morning. On Jun 10, 3:30 pm, Mark Rathw

List comprehension not running

2011-06-16 Thread Thomas
h numbers "foo" watcher) (dosync (alter numbers disj 1)) Thanks in advance, Thomas ps. I am running 1.2.1 -- 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

Spitting out a lazy seq to file???

2011-08-16 Thread Thomas
ure.lang.LazySeq@58d844f8 Because I get the lazy sequence I think I have to force the execution? but where exactly? And how? Thanks in advance!!! Thomas -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: Clojure for banking and invenstment system?

2012-03-20 Thread Thomas
have a look here: http://blog.malcolmsparks.com/ On Tuesday, March 20, 2012 2:03:30 PM UTC, Roller wrote: > > I dont understand why some companies use clojure for finance. > > > How can I work there ? > What do I have to learn ? -- You received this message because you are subscribed to the G

question about a macro

2012-04-19 Thread Thomas
sary?) level of indirection Any hints would be greatly appreciated. - thomas -- 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 - p

Re: question with macro!

2012-05-02 Thread thomas
the arguments to randomly-fn are evaluated before the macro-expansion of randomly kicks in. (that's what macros are for: control if, where and how often an expression is evaluated) So why would you need randomly-fn anyway? You can just write randomly (print 1) (print 2) (print 3)) and this w

Re: Mini Beast - Overtone + Quil

2012-07-05 Thread Thomas
Sam, Could you make a video for us available? Cheers. Thomas -- 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

Re: Clojurians in the midlands (UK)

2012-07-20 Thread Thomas
There are a few on the South coast, Southampton - Portsmouth area. We were thinking about stating a groups as well. so if anyone is interested please let us know. Thomas On Tuesday, July 17, 2012 9:06:33 AM UTC+1, Colin Yates wrote: > > I know there are a few in London, but are the

Help - I am doing something wrong (lein cljsbuild fails)

2012-09-11 Thread Thomas
m people who hit this in the past ran older versions of both Clojure and lein cljsbuild (I run the latest lein2) Any ideas, help would be really appreciated!!! Thanks, Thomas -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to thi

Re: Help - I am doing something wrong (lein cljsbuild fails)

2012-09-11 Thread Thomas
apperently)... but how to work around it? Thomas -- 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 firs

Re: Help - I am doing something wrong (lein cljsbuild fails)

2012-09-11 Thread Thomas
> > > You should use :plugins for plugins. :dev-dependencies doesn't do > anything in Lein 2. > > e.g. :plugins [[lein-cljsbuild "0.2.7"]] > > This might solve your problem. > Tried that as well, and it didn't work :( Thomas -- You received

Re: Help - I am doing something wrong (lein cljsbuild fails)

2012-09-12 Thread Thomas
Found the problem. I needed to update to the latest version of Noir ("1.3.0-beta10") and that solved my problem. Thanks everyone Thomas -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cloj

Re: best practices for small RAM usage

2012-10-03 Thread Thomas
try and use a 32bit JVM. I found that a 64bit JVM uses almost twice as much memory. YMMV Thomas -- 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 m

ClojureScript; How to set a field in an external JS library?

2012-11-15 Thread Thomas
s.analyzer/expr :cljs.analyzer/property :cljs.analyzer/expr] And I can see msg in the console with its various fields. TIA, Thomas -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.

Re: ClojureScript; How to set a field in an external JS library?

2012-11-15 Thread Thomas
Thank you Frank!!! That did the trick (DOH) Thomas On Thursday, November 15, 2012 4:40:53 PM UTC, FrankS wrote: > > Try: > > (set! (.-destinationName msg) "test-topic") > > http://himera.herokuapp.com/index.html > > -FS. > > > > On Nov 15, 2

More ClojureScript questions....

2012-11-20 Thread Thomas
is of course not that surprising... But how to do this properly in CLJS? TIA Thomas -- 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 moder

Re: More ClojureScript questions....

2012-11-20 Thread Thomas
any more info please let me know. Thomas On Tuesday, November 20, 2012 4:07:12 PM UTC, David Nolen wrote: > > What does your ClojureScript code look like? > > > On Tue, Nov 20, 2012 at 5:47 AM, Thomas > > wrote: > >> Hi, >> >> I am trying to use an existi

Re: More ClojureScript questions....

2012-11-21 Thread Thomas
That did the trick David, thanks for pointing out (with hindsight) the obvious to me. Thomas -- 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 m

Re: How was the skills matters conference in London (6. Dec)?

2012-12-07 Thread Thomas
It was really great, all the videos are up already: http://skillsmatter.com/event/scala/clojure-exchange-2012 Have a look. Thomas On Friday, December 7, 2012 10:59:32 AM UTC, john wrote: > > Hi, > I couldn't make it to the skill matters conference in London ))-: > just bein

Re: Clojure raytracing scene description language

2012-12-10 Thread Thomas
nse I think, as it would make porting code easier. Thomas -- 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 y

Vector of different refs?

2012-12-11 Thread Thomas
surprisingly), but I would like to have ten different refs instead. TIA, Thomas -- 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 -

Re: How to structure a Clojure day for noobs?

2012-12-20 Thread Thomas
statements, the loop, local variables, the fact that the two statements in the first if with can only be ordered in that way etc). and then show them the clojure code, talk them through that and show them what it better (even if functionally completely equivalent) about it. just a thought, Thomas

Re: Unseemingly Eager Clojure Apprentice Seeking FizzBuzz Feeback

2012-12-31 Thread Thomas
Just to bring this one back to topic; here is another FizzBuzz, this time no cond/if statement: (def three (cycle [nil nil "fizz"])) (def five (cycle [nil nil nil nil "buzz"])) (map vector (range 1 16) three five ) ;([1 nil nil] [2 nil nil] [3 "fizz" nil] ...

blank? implementation

2013-01-15 Thread Thomas
itch style equivalent) TIA, Thomas -- 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 unsubsc

Re: blank? implementation

2013-01-15 Thread Thomas
I think I just answered my own question... user=> (time (dotimes [n 2] (s-blank? "asdf"))) "Elapsed time: 2481.018 msecs" nil user=> (time (dotimes [n 2] (blank? "asdf"))) "Elapsed time: 14.347 msecs" nil user=> Quite a difference I hav

How to (easily) show the advantages of Clojure

2013-01-16 Thread Thomas
? example from Stuart Halloway to show people the difference). Thomas -- 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 pa

Re: Idiomatic pmap for side-effects ?

2011-12-09 Thread Thomas
Stuart Any idea when the Fork/Join frame work will be included in Clojure proper? I have seen the presentation somewhere on the web and it looks very promising. Thomas On Dec 8, 9:37 pm, Stuart Sierra wrote: > doall + pmap will work, but be aware that pmap is not particularly clever >

Re: Clojure is two!

2009-11-03 Thread Ross Thomas
On Oct 19, 9:25 pm, ngocdaothanh wrote: > For most programming languages, I only need 2 books: an introduction > one and a cookbook one. +1 for a Clojure cookbook. The same combo for Perl was very effective for me. -Ross --~--~-~--~~~---~--~~ You received this m

New user/request for code critique/Clojure is awesome

2009-11-13 Thread Ross Thomas
I'd say hi, and solicit opinions on my first "non- trivial" (that's a relative term ;)) Clojure program, a toy server which opens a listening socket and prints a message to each connecting client: ;;; (ns seq-server #^{:author "Ross Thomas "} (:import (java.net

Re: Strange little difference with the reader and the java float parsers

2009-11-27 Thread Ron Thomas
user=> (- (new Double "1786.28") (read-string "1786.28")) 0.0 Following uip on what Hugo said, modifying your code to a double returns the following. On Nov 27, 1:32 pm, "Hugo Duncan" wrote: > On Fri, 27 Nov 2009 14:50:27 -0500, Nathan Cunningham   > > wrote: > > Apparently there are cases whe

Server LISP-paper

2010-05-21 Thread Thomas Larsen
ested in the paper, they are more than welcome to forward this e- mail. Comments may be sent to: thlasoftw...@gmail.com Best Regards Thomas Larsen -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@g

Re: with-open and for

2013-06-08 Thread Thomas Heller
(line-seq rdr Wether you want a set or a vector is up to you, set seems more logical to me here. Didn't check how expensive set/union is, might be better to use concat with a final set (after reduce) if there are a lot of lines. Anyways, use reduce. ;) HTH, /thomas On Saturday,

Re: with-open and for

2013-06-10 Thread Thomas Heller
Hey, I pasted the code into gist ( https://gist.github.com/thheller/5734642 ) and copy&pasted that into the post. Cheers, /thomas On Mon, Jun 10, 2013 at 6:01 PM, Alan Thompson wrote: > Hey Thomas - How'd you get the nice syntax highlighting in your post? > Alan > > >

Re: ANN: core.match 0.2.0-rc1

2013-06-24 Thread Thomas Heller
apart from this bug core.match just might finally make me do some serious testing. Cheers, /thomas On Monday, June 24, 2013 4:15:56 PM UTC+2, David Nolen wrote: > > I've written up how core.match works here > http://github.com/clojure/core.match/wiki/Understanding-the-algorith

Re: [ClojureScript] Re: ANN: core.match 0.2.0-rc1

2013-06-24 Thread Thomas Heller
ory-wise. Well, time will tell. Just an idea I had floating around. Cheers, /thomas On Monday, June 24, 2013 6:01:37 PM UTC+2, David Nolen wrote: > > Thanks for the report, fixed and 0.2.0-rc2 is going out. > > Probably going to hold off on ex-info change, the behavior of match is th

Re: ANN: cljson, for faster browser deserialization

2013-06-24 Thread Thomas Heller
map specifying readers? eg. (cljson->clj {:readers {"my.ns/test" my-reader-fn}} json-string), basically the same API as clojure.edn/read? Thanks, /thomas On Monday, June 24, 2013 7:23:26 PM UTC+2, Alan Dipert wrote: > > Hi all, > I'm pleased to announce the release of

Re: core.async

2013-06-29 Thread Thomas Heller
Hey, this looks very interesting. However I'm a little concerned about the semantics of >! and https://gist.github.com/thheller/5890363 (ns thheller.async-test (:use clojure.test) (:require [clojure.core.async :as async :refer (go >! !! ! reply-to reply) (recur (inc work-done))

Re: Sequential conditional transforms of an argument

2013-07-05 Thread Thomas Heller
mple (cond-transform x [test1 transform1] [test2 transform2] [test3 transform3]) in my project. test1,transform1,etc are functions with one argument (the current x). transform will only be called when test returns true. HTH, /thomas On Friday, July 5, 2013 2:13:05 PM UTC+2, Laurent P

Re: Ring's session cookie-store

2013-07-06 Thread Thomas Heller
/wrap-session) which should fix your expiration issues. HTH, /thomas On Saturday, July 6, 2013 1:20:57 PM UTC+2, Alexander Solovyov wrote: > > Hi all, > > I wrote a small site using compojure and friend and naturally I used > ring's own wrap-session to handle sessions. My

core.async pub/sub

2013-07-09 Thread Thomas Heller
es, since I don't want any subscriber to block others. How do you guys deal with slow-readers? I don't really have a specific problem but I wonder if there are any plans for some built-in pub/sub mechanisms for core.async. Seems like a very common pattern. Anyways, core.async is n

Re: core.async pub/sub

2013-07-11 Thread Thomas Heller
emoved, otherwise a subscription is removed by closing it. Could be optimized but it seems to work fine for me. Will follow the lab.clj when I'm ready to get dirty with the internals. ;) Cheers, /thomas On Wednesday, July 10, 2013 12:27:59 PM UTC+2, Alex Miller wrote: > > There is

Re: cljx 0.3.0 released

2013-07-11 Thread Thomas Heller
This is awesome, thanks a ton. Solved all the issues I had with 0.2 Cheers, /thomas On Wednesday, July 10, 2013 8:26:03 PM UTC+2, Chas Emerick wrote: > Earlier today, we released [com.keminglabs/cljx "0.3.0"], which brings a > bunch of significant changes

Re: Things get slow if hashmap has 1000 Elements

2013-07-17 Thread Thomas Heller
-effects (alter the ref), use (dotimes [_ 1000] (addmob)) It has the added benetfit of returning nil, so nothing is printed. HTH, /thomas On Wednesday, July 17, 2013 10:50:42 AM UTC+2, vis wrote: > > Hello everyone, > I have a ref, which is a hashmap of monsters (they key is a uniqu

Re: [ANN] Compliment - a completion library you deserve

2013-08-10 Thread Thomas Goossens
I think I am going to love this! On Friday, August 9, 2013 6:19:40 PM UTC+2, Alexander Yakushev wrote: > > Dear community, > > I've just released the initial version of my clojure-complete fork, > Compliment. I decided to move it into a separate project after I rewrote > most of it. Here is proj

Re: ClojureScript: Keyword Breaking Change Around the Corner

2013-08-29 Thread Thomas Heller
Hey, this sounds interesting. I just tried it on my project but it seems to be missing several keywords in the constants_table.js. Dumb example: the code tries to use cljs.core.constant$keyword$1064 , which does not exist. Will try to investigate, just a heads up. /thomas On Wednesday

Re: ClojureScript: Keyword Breaking Change Around the Corner

2013-08-29 Thread Thomas Heller
ep javascript files small". Will have to look at other optimizations I guess, although overall its less. Apart from that everything seems to work so far, although I don't have many tests for all my dom code. But a quick click through every page works. ;) Regards, /thomas On Thursda

Re: ClojureScript: Keyword Breaking Change Around the Corner

2013-08-30 Thread Thomas Heller
ferences (IMHO). Just my 2 cents, /thomas -- -- 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 firs

  1   2   3   4   >