Line directive in Clojure

2010-02-02 Thread Praki
blocks delimited by special tags, as in GHC, that would be lovely! Thanks, Praki -- 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 -

Has deftype changed?

2010-04-17 Thread Praki
I am seeing compilation errors in my code with deftype. I just updated my project dependencies and probably pulled in the latest clojure package. Anyway, the following code from wiki doesn't work anymore. Pointers to any late breaking changes much appreciated! TIA (deftype Bar [a b c d e]) (def b

Problem reading record instances

2010-04-30 Thread Praki
I am unable to read-string record instances produced by pr-str. user> (defrecord Z [x y]) user.Z user> (read-string (pr-str (Z. 1 2))) ; Evaluation aborted. The exception is: java.lang.Exception: No dispatch macro for: : [Thrown class java.lang.RuntimeException] However, struct instances are

ClojureScript: spurious warning about symbol not being a protocol

2013-05-20 Thread Praki
Hi, For reasons I cant quite fathom, "lein cljsbuild" generates "Symbol X is not a protocol" warning. I am using clojure 1.5.1 and cljsbuild 0.3.2. The following code snippet reproduces the issue. Please note that renaming "my.foo" namespace to "foo" compiles with no warning. ;; file:: foo.clj

Perplexing bug

2010-06-09 Thread Praki
I started using one-jar to package my clojure code as a single executable jar and ran into a problem right away with loading of classes. I have a very simple project at g...@github.com:fgx3prak/ bug.git that crashes in the same manner as my real code base and think that the underlying problem is th

java.lang.ClassFormatError: Invalid method Code length

2010-07-20 Thread Praki
Hi, I am getting this error when trying to load one of my modules. Does anybody know if the compiler checks for method lengths? Has anyone run into this issue and have suggestions on how to work around this? Thanks, Praki Compiling singularis.repo.bucket to /home/pprakash/projects/gwave/repo

bit-clear broken in alpha7?

2011-05-14 Thread Praki
bit-clear documentation doesn't explicitly state that index is zero- based but I would think so. Alpha7 seems to have broken this function. user> *clojure-version* {:major 1, :minor 3, :incremental 0, :qualifier "alpha4"} user> (bit-clear 3 1) 1 user> (bit-clear 3 0) 2 user> (bit-clear 3 2) 3 user

deftype issue in 1.3-beta1

2011-06-25 Thread Praki
This looks like an issue with hyphenated attribute names in deftype. defrecord seems to be fine. user> *clojure-version* {:major 1, :minor 3, :incremental 0, :qualifier "beta1"} user> (deftype Foo [foo]) user.Foo user> (Foo. 1) #user.Foo[1] user> (deftype Bar [bar-id]) user.Bar user> (Bar. 1) ; Ev

ClojureScript compiler generates incorrect javascript code for protocol function

2012-07-10 Thread Praki
Hi, The javascript code generated for the following clojurescript is wrong. The problem is, if the protocol name is hyphenated, the generated name is treating that as an arithmetic expression rather than translating the hyphen to underscore. The git tag of clojurescript is r1443. I am not very

Mutable fields in ClojureScript deftype

2011-09-09 Thread Praki
Hi, Compiling the following code throws an exception as below. I looked at compiler.clj and don't understand the reason for this error. I am not sure what a "local var" is and I would think "x" would be a field which should be settable. Are mutable deftype fields not supported in ClojureScript? (

read-string behavior in ClojureScript

2011-10-10 Thread Praki
In Clojure (read-string ":a:b:c") returns :a:b:c (a keyword with two embedded colons) whereas ClojureScript returns :a. In ClojureScript reading of a token ends at whitespace or a macro character (except ' and #). Is this difference deliberate or just an oversight and colon to be allowed to be part

ClojureScript memoize throws error

2011-10-12 Thread Praki
I am running into a problem with memoized functions in ClojureScript. Functions which take a single argument work okay but functions of two args throw an error. I haven't been able to isolate the bug (I am able to hash vectors and nested vectors just fine). Any hints on the root cause or workaroun

Clojurescript browser repl woes

2011-11-06 Thread Praki
Hi, I have a clojurescript app which connects to a repl server. But it never worked, always hanging in evaluating the expression. As the repl sample app which comes with clojurescript worked, I soon managed to establish that my browser repl works as expected if I don't run my application code (whi

"Late provide error" in compiling clojurescript files

2012-01-03 Thread Praki
Hi, I have a silly problem compiling my cljs files. I have to run the cljsc command twice in succession to generate javascript source. The first compilation results in: ERROR: JSC_LATE_PROVIDE_ERROR. required "foo.bar" namespace not provided yet at /home/.../src/../target/classes/public/js/core.j

read support for defrecord instances in clojurescript

2012-01-10 Thread Praki
Is cljs/reader going to support reading defrecords? Also, is there a clojurescript library that can serialize and deserialize defrecord/ deftype? Thanks -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@goog

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Praki Prakash
quite mature and well-documented. Any clojure-specific needs could be addressed through a plug-in. Comments, thoughts? Thanks, Praki On Thu, Mar 4, 2010 at 5:52 AM, Stuart Halloway wrote: > Hi Jan, > > My 2c: Leiningen is an important step, but there is still plenty to do. > > My

Re: Simple functional programming lexicon?

2010-03-17 Thread Praki Prakash
different with respect to the level of formalism you need to use them. But, Haskell is one of the most mind bending programming language there and well worth the study. Praki On Wed, Mar 17, 2010 at 5:16 PM, Ben Armstrong wrote: > On 17/03/10 04:54 PM, David Nolen wrote: > >> To me

Re: Has deftype changed?

2010-04-18 Thread Praki Prakash
Thanks Andrew. I did catch 'this' argument requirement sometime back but the 'new' bit escaped me. Praki On Sat, Apr 17, 2010 at 6:16 PM, Andrew Stein wrote: > > (deftype Bar [a b c d e]) > (def b (new Bar 1 2 3 4 5)) > > There are a few other syntax change

Re: Has deftype changed?

2010-04-18 Thread Praki Prakash
That was my interpretation as well. I now have defrecord instead of deftype everywhere. It looks like deftype was refactored into deftype and defrecord. deftype implements none of the usual interfaces (IPersistentMap) whereas defrecord does. Praki On Sun, Apr 18, 2010 at 11:33 AM, ataggart

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Praki Prakash
> personally, I like strip or trim than chomp/chop. > +1 Seeing how Clojure dropped/changed many classic Lisp monikers, there is no reason to use comp/chop which may be familiar to somebody with Perl/Python but confusing to others. -- You received this message because you are subscribed to the

Re: My recap of Clojure/conj 2013

2013-11-20 Thread Praki Prakash
Please accept my thanks as well! Regards, Praki Prakash On Wed, Nov 20, 2013 at 6:25 PM, Eduardo Lávaque wrote: > Thanks for this Logan. :) > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to th

Re: ANN: Clojure High Performance Programming

2013-11-21 Thread Praki Prakash
Hi Shantanu, Congrats on the book. Looks like it's going to be a great read and no doubt a much needed book on the subject of performant code. Regards, Praki Prakash On Thu, Nov 21, 2013 at 11:09 AM, Shantanu Kumar wrote: > > > On Thursday, 21 November 2013 21:39:36 UTC+5:30

Re: core.async question - canceling thread

2014-01-22 Thread Praki Prakash
What is the task doing? If it is in a tight loop, it must check explicitly whether the interrupt flag is set and abort. If it is waiting on some resource, it will receive InterruptedException. Regards, Praki Prakash On Wed, Jan 22, 2014 at 11:20 AM, Mark Engelberg wrote: > On Wed, Jan 22, 2

Re: Perplexing bug

2010-06-09 Thread Praki Prakash
gt; clojure-http-client, the namespace was renamed to clojure-http.client. > This was a small issue with my fork from clojure-couchdb. > > (I think clojure-http-client really needs a stable release for clojure 1.1.0) > > On Wed, Jun 9, 2010 at 7:31 PM, Praki wrote: >> I started usi

Re: Perplexing bug

2010-06-09 Thread Praki Prakash
Same story with the latest snapshot of clojure-http-client. Same thing happens with compojure.core. > BTW, I am using 1.2.0-master-SNAPSHOT for clojure and clojure-contrib > but clojure-http-client is 1.0.0-SNAPSHOT. I will try this with the > most recent version. > > Thanks > > wrote: >> I'm no

Re: Perplexing bug

2010-06-09 Thread Praki Prakash
x27;clojure') > > On Wed, Jun 9, 2010 at 8:04 PM, Praki Prakash wrote: >> Same story with the latest snapshot of clojure-http-client. Same thing >> happens with compojure.core. >> >> >>> BTW, I am using 1.2.0-master-SNAPSHOT for clojure and clojure-contrib &g

Re: Clojure 1.2 Beta 1

2010-07-14 Thread Praki Prakash
I think my number crunching code would benefit immensely from equals/equiv code. When can we hope to see a release containing equals/equiv effort? Thanks On Wed, Jul 14, 2010 at 10:42 AM, Stuart Halloway wrote: > Later release. > >> I didn't see mention of the new equals/equiv work. >> Is this g

Re: Suggestions for a &file and &line implicit argument in macros

2010-07-14 Thread Praki Prakash
I have the same problem and implicit file/line arguments would be very useful to me as well. On Wed, Jul 14, 2010 at 8:21 AM, Nicolas Oury wrote: > Dear all, > I am using a lot of macros with a quite complex syntax and I would like to > be able to report error nicely. > I haven't been able to fi

Re: Alright, fess up, who's unhappy with clojurescript?

2011-07-28 Thread Praki Prakash
> > I am not a front-end developer but I am currently stuck prototyping using JQuery. I am also not a JS expert. I am curious: can you list JQuery's issues and how it uses JS badly? Or, provide some references? -- (praki) -- You received this message because you are subscribed to the Google

Re: "Late provide error" in compiling clojurescript files

2012-01-04 Thread Praki Prakash
want to check for that, too.. > > Regards Benjamin > > On Jan 3, 9:19 am, Praki wrote: >> Hi, >> >> I have a silly problem compiling my cljs files. I have to run the >> cljsc command twice in succession to generate javascript source. The >> first compilati

Re: ClojureScript – inter-namespace usage

2012-01-09 Thread Praki Prakash
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, send email to > clojure+unsubscr...@googl

Re: I don't understand how to instantiate a closure library object

2012-01-10 Thread Praki Prakash
On Tue, Jan 10, 2012 at 2:22 PM, billh2233 wrote: > I'm trying to instantiate a new goog.fx/Animate object, but the > constructor doesn't return anything: > >  (:require [goog.fx :as fx]) >  (let [anim (fx/Animation (array 22 33) (array 44 55) 1000 nil)] >    "anim:>" # "    ... (let [anim (fx/An

Re: ANN: Clojure 1.4.0-beta1

2012-02-03 Thread Praki Prakash
gt; Bye, > Tassilo > > -- > 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 &

Re: Knuth's literate programming "tangle" function in Clojure

2010-12-26 Thread Praki Prakash
ys in one location and I just replace latex lines with empty lines. How do you address this issue? Thanks, Praki On Sat, Dec 25, 2010 at 10:01 PM, Tim Daly wrote: > ; 0 AUTHOR and LICENSE > ; 1 ABSTRACT and USE CASES > ; 2 THE LATEX SUPPORT CODE > ; 3 IMPORTS > ; 4 THE TANGL

Re: First foray into profiling

2011-01-09 Thread Praki Prakash
. Praki On Sun, Jan 9, 2011 at 10:52 AM, Mark Engelberg wrote: > On Sun, Jan 9, 2011 at 3:15 AM, Mark Engelberg > wrote: > > In the meantime, I fired up the "lein repl" which did start up in > > -server mode, and tried to do some profiling. It tells me 80% of it