Re: Critiques of my-flatten which uses CPS

2014-07-16 Thread Mark Engelberg
It's worth understanding how to go back and forth between accumulator-style and a lazy construction. You can convert the above non-lazy accumulator version into a similar version that is lazy but has no risk of stack overflow in the realization of that lazy flattened list: (defn my-flatten

Re: Re-upload corrupted Rich Hickey video?

2014-07-16 Thread TP
Download the file via some youtube downloader. The downloaded file is not corrupted. On Tue, Jul 15, 2014 at 4:46 PM, Herwig Hochleitner hhochleit...@gmail.com wrote: 2014-07-16 0:18 GMT+02:00 gvim gvi...@gmail.com: Clojure for Lisp Programmers Part 1 by Rich Hickey:

[ANN] Brute 0.3.0 - A lightweight Entity Component System library for writing games

2014-07-16 Thread Mark Mandel
Brute is a simple and lightweight Entity Component System library for writing games with Clojure and now also **ClojureScript**. Big thanks to Martin Janiczek https://github.com/Janiczek for porting Brute over to CLJX and making everything work. There are also some new functions - including:

[ANN] tools.namespace 0.2.5

2014-07-16 Thread Stuart Sierra
*tools.namespace:* finding, parsing, and reloading Clojure namespaces in correct dependency order https://github.com/clojure/tools.namespace *Release 0.2.5* Leiningen dependency: [org.clojure/tools.namespace 0.2.5] This release contains bugfixes, performance enhancements, and minor

[ANN] monads 0.2.2

2014-07-16 Thread Ben Wolfson
After a surprisingly long time I'm releasing a new version of my monads library, focussed on expressivity and correctness: https://github.com/bwo/monads Leiningen: [bwo/monads 0.2.2] Improvements from 0.1.0 include: - change from maps to protocols for monad implementations, which has

Re: [ANN] tools.namespace 0.2.5

2014-07-16 Thread Ambrose Bonnaire-Sergeant
Fantastic! Thanks Stuart! Ambrose On Wed, Jul 16, 2014 at 9:10 PM, Stuart Sierra m...@stuartsierra.com wrote: *tools.namespace:* finding, parsing, and reloading Clojure namespaces in correct dependency order https://github.com/clojure/tools.namespace *Release 0.2.5* Leiningen

handling only a part of a hash-map

2014-07-16 Thread Christian
Hi, I'm just beginning with clojure. ;(let [conn (mg/connect) ; db (mg/get-db conn throughput) ; coll clojure_throughput_src] ;;; with a query, as Clojure maps ; ( doseq [item (mc/find-maps db coll {})] ;(println ; (get_timeslot ;(get_dt ; ( get item

NPE on ((print))

2014-07-16 Thread vag . vagoff
Hi! user= ((print)) NullPointerException user/eval1 (NO_SOURCE_FILE:1) Is that behaviour indended? -- 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

Re: NPE on ((print))

2014-07-16 Thread Ambrose Bonnaire-Sergeant
Hi, Parenthesis are for function invocations in Clojure. ((print)) calls the result of print (which is null) aka. nil, which results in a NPE. Thanks, Ambrose On Thu, Jul 17, 2014 at 1:20 AM, vag.vag...@gmail.com wrote: Hi! user= ((print)) NullPointerException user/eval1

Re: handling only a part of a hash-map

2014-07-16 Thread Mike Fikes
select-keys makes it easy to extract a portion of a map: (select-keys {:id 1 :ts 2 :ignore 3} [:id :ts]) = {:ts 2, :id 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

[Call for Papers] 2014 Scheme and Functional Programming Workshop

2014-07-16 Thread Jason Hemann
[Apologies for duplication from cross-postings.] Important Note: This year's Scheme and Functional Programming Workshop is co-located with Clojure/conj. Clojure-related papers are encouraged, as are first-time and non-academic authors. -- JBH DEADLINE: 5 September 2014, (23:59 UTC-12)

casting error

2014-07-16 Thread Brian Craft
Trying to eliminate a reflection warning, I put a type hint on a function, like (defn foo ^PStatement [] ...) which compiles without the reflection warnings, but at run time I get ClassCastException java.lang.ClassCastException: cavm.h2.PStatement cannot be cast to cavm.h2.PStatement What

TBNL: power tool for Android system hacking tool in Clojure

2014-07-16 Thread Wei Peng
Hi All, I want to share with you an Android system hacking tool that I have been working on the past few weeks that is written entirely in Clojure github repo: https://github.com/pw4ever/tbnl brief video tour: http://youtu.be/Hvzl_RK5JH0 http://youtu.be/Hvzl_RK5JH0 Two features highlighted in

Re: casting error

2014-07-16 Thread Brian Craft
Apparently this is due to a class loader problem. I moved it into a different file to try to avoid the problem. However I'm now finding that nothing referencing foo will compile, throwing this error: CompilerException java.lang.IllegalArgumentException: Unable to resolve classname: PStatement

Re: casting error

2014-07-16 Thread Andy Fingerhut
Try fully qualifying the class name in the return type hint. Might be the same symptom as in this ticket: http://dev.clojure.org/jira/browse/CLJ-1232 Andy On Wed, Jul 16, 2014 at 7:18 PM, Brian Craft craft.br...@gmail.com wrote: Apparently this is due to a class loader problem. I moved it

Re: Critiques of my-flatten which uses CPS

2014-07-16 Thread Mark P
Interesting - thank you! Good to know about into as a way to achieve a non-lazy concat - in conjunction with a vector. I like your accumulator version - morphing the structure of the input as you go to achieve the desired result. I've come up with another version, that passes through both a

Re: casting error

2014-07-16 Thread Brian Craft
That does, in fact, fix the compile issue. Thanks! The cast error, however, persists. It's something to do with reloading the namespace with the defrecord. Once it happens, it takes a lein clean to clear. After that it works w/o error until the namespace is reloaded. It's something to do with

Re: casting error

2014-07-16 Thread Brian Craft
I have a wonky work-around. The file that is aot compiled depends on the file with the defrecord reference. I eliminated the direct dependency and exported a function that does an alter-root-var. So the provider injects the required value into the dependent. On Wednesday, July 16, 2014 9:33:52