Re: side-effect only function with map-like syntax (again)

2014-01-27 Thread Jan Herich
How about doseq  ? 

Dňa utorok, 28. januára 2014 5:28:04 UTC+1 Mars0i napísal(-a):
>
> Back in 2007 (
> https://groups.google.com/forum/#!searchin/clojure/mapc/clojure/x0PDu_D6mP0/3A7CZe-ZDWAJ),
>  
> Henk Boom raised the possibility of including in Clojure a function with 
> syntax like map, but semantics more like Common Lisp's mapc (or Scheme's 
> for-each, I believe).  It works just like Clojure map, but applies the 
> function to items in a sequence (sequences) only for side-effects.  A 
> sequence of results isn't generated, so there's no need for laziness.  
> There was discussion, and at one point Rich Hickey seemed to say that he 
> had added this kind of function, under the name 'scan'.  It looks like scan 
> was subsequently renamed to 'dorun' (http://clojure.org/old_news), but 
> dorun doesn't do what mapc does.  As far as I can tell, there is no such 
> function at present in Clojure.  Is that correct?
>
> There are other ways to get the same functionality, and it's easy to 
> define a simple version of mapc (or whatever it should be called).  
> However, I like the map syntax, even for side-effects, and don't want to 
> reinvent the wheel.  Even for small sequences, in which producing a 
> sequence as output isn't costly, using mapc tells readers of your code that 
> you're iterating over the list solely for side-effects.
>
> (defn mapc [f coll] (doseq [x coll] (f x)))
>
> For example, creating a mutable vector using core.matrix:
>
> => (def a (zero-vector :ndarray 5))
> #'popco.core.popco/a
> => a
> #
> => (mapc #(mset! a % -1) [0 2 4])
> nil
> => a
> #
>
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Help about using clojure in org mode in Emacs with CIDER

2014-01-27 Thread Bastien
Hi Greg,

greg r  writes:

> I compared a computer set up with the latest of everything (org/emacs
> /CIDER) and compared to an older computer still using nrepl-jack-in
> and older versions of everything else.  The behavior is definitely
> different with the newer system, and can be seen with a very simple
> case:

Can you report this to the org-mode mailing list?
https://lists.gnu.org/mailman/listinfo/emacs-orgmode

Thanks,

-- 
 Bastien

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


standard indentation tool

2014-01-27 Thread bob
Hi All,

Should clojure have a standard format tool like go lang, it will waste time.

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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


side-effect only function with map-like syntax (again)

2014-01-27 Thread Mars0i
Back in 2007 
(https://groups.google.com/forum/#!searchin/clojure/mapc/clojure/x0PDu_D6mP0/3A7CZe-ZDWAJ),
 
Henk Boom raised the possibility of including in Clojure a function with 
syntax like map, but semantics more like Common Lisp's mapc (or Scheme's 
for-each, I believe).  It works just like Clojure map, but applies the 
function to items in a sequence (sequences) only for side-effects.  A 
sequence of results isn't generated, so there's no need for laziness.  
There was discussion, and at one point Rich Hickey seemed to say that he 
had added this kind of function, under the name 'scan'.  It looks like scan 
was subsequently renamed to 'dorun' (http://clojure.org/old_news), but 
dorun doesn't do what mapc does.  As far as I can tell, there is no such 
function at present in Clojure.  Is that correct?

There are other ways to get the same functionality, and it's easy to define 
a simple version of mapc (or whatever it should be called).  However, I 
like the map syntax, even for side-effects, and don't want to reinvent the 
wheel.  Even for small sequences, in which producing a sequence as output 
isn't costly, using mapc tells readers of your code that you're iterating 
over the list solely for side-effects.

(defn mapc [f coll] (doseq [x coll] (f x)))

For example, creating a mutable vector using core.matrix:

=> (def a (zero-vector :ndarray 5))
#'popco.core.popco/a
=> a
#
=> (mapc #(mset! a % -1) [0 2 4])
nil
=> a
#

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Looking for a reference binary parsing

2014-01-27 Thread Cedric Greevey
On Mon, Jan 27, 2014 at 4:13 PM, danneu  wrote:

> ztellman's Gloss is magic to me.
>
> - Here's an example of my first attempt to use Gloss to parse the Bitcoin
> protocol: https://gist.github.com/danneu/7397350 -- In 2-chan.clj, it
> demonstrates using ztellman's Aleph to send Bitcoin's verack handshake to a
> node and ask it for blocks.
>

I assume we don't want to know what's in 4-chan.clj. ;)


> - Bitcoin protocol specs are described here:
> https://en.bitcoin.it/wiki/Protocol_specification
> - The hardest part of the protocol was
> https://en.bitcoin.it/wiki/Protocol_specification#Variable_length_integer,
> but Gloss makes it easy.
> - The latest version of my code is here (
> https://github.com/danneu/chaingun/blob/master/src/chaingun/codec2.clj)
> but it became coupled to my Datomic entities, so it's perhaps more
> confusing.
>
> I wasn't able to find any easy to follow real-world examples back when I
> was checking it out, so hopefully that helps someone.
>
> The amount of time Gloss has saved me is dumbfounding.
>

What's the Bitcoin code good for though? A Clojure-based miner will be
stomped into the dust by the HW-accelerated mining machines that exist
nowadays. Or is this for managing a wallet and making transactions?

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: equality

2014-01-27 Thread Cedric Greevey
Seems to me that BigDecimal, being essentially a BigInteger numerator and a
power-of-ten denominator, could have been accommodated in Category 1 given
that Ratio could.


On Mon, Jan 27, 2014 at 10:26 AM, Andy Fingerhut
wrote:

> As Jim already mentioned, you can use == to compare numbers for equality,
> but you must be cautious with equality for floating point numbers, as the
> tiniest bit of roundoff error will cause = and == to be false for such
> comparisons.
>
> For =, there are effectively 3 'categories' of numeric values in Clojure,
> each of which can be = to each other within a category, but between
> categories values are never = to each other.
>
> Category 1. integer values (including Java Byte, Short, Integer, Long,
> BigInteger, and Clojure BigInt types) and ratio values (Clojure's Ratio
> type)
> Category 2. float and double values (Java Float and Double)
> Category 3. BigDecimal
>
> This is better than Java equals(), where Byte and Short are never equals()
> to each other, etc.  Two numeric values must be the same Java class for
> equals() to be true.
>
> Why the 3 categories, you may wonder?  I didn't design it myself, but my
> best guess is that in order to have a hash function (in this case Clojure's
> hash, implemented as a Java method called hasheq()) that is consistent with
> Clojure =, it is difficult to make such a hash function correct and fast if
> there were not these 3 separate categories.
>
> Andy
>
>
> On Mon, Jan 27, 2014 at 5:39 AM, Eric Le Goff  wrote:
>
>> Newbie question :
>>
>> user=> (= 42 42)
>> true
>> user=> (= 42 42.0)
>> false
>>
>> I did not expect last result.
>>
>> I understand that underlying classes are not the same
>> i.e
>> user=> (class 42)
>> java.lang.Long
>> user=> (class 42.0)
>> java.lang.Double
>>
>>
>> but anyway I'am surprised
>>
>> Cheers
>>
>>
>> --
>> Eric
>>
>>  --
>> --
>> 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, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Help about using clojure in org mode in Emacs with CIDER

2014-01-27 Thread greg r
I compared a computer set up with the latest of everything 
(org/emacs/CIDER) and compared to an older computer still using 
nrepl-jack-in and older versions of everything else.  The behavior is 
definitely different with the newer system, and can be seen with a very 
simple case:

Code block:
#+begin_src clojure :results value raw
[1 2 3 4]
#+end_src

New: (CIDER)
#+RESULTS:
[1 2 3 4]

Old: (nrepl)
#+RESULTS:
| 1 | 2 | 3 | 4 |

It appears the conversion to org table is not happening.

Regards,
Greg

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Java interoperability

2014-01-27 Thread Jarrod Swart
The typical route I take is to always check http://clojure-toolbox.com 
first to see if a library exists.  If not and it's a trivial thing I might 
just write it myself.  My first thought is never, "Hey I should go grab a 
Java lib to do this."

But typically yes JSON is extremely close to clojure maps.  So you just 
work with maps then when you need to send\read JSON use cheshire, or 
data.json to convert.

Hope that helps.

On Monday, January 27, 2014 10:54:33 AM UTC-5, Paul Smith wrote:
>
> Hi Jarrod
>
> > Any reason not to use a Clojure library like cheshire for JSON?
>
> Yes, I am probably taking the wrong approach. Is the Clojure way to put 
> the JSON in Clojure data structures and manipulate it with filters etc? 
>
> Many Thanks
>
> Paul
>
>
> On Mon, Jan 27, 2014 at 3:35 PM, Jarrod Swart 
> > wrote:
>
>> It looks like the method exists to me: 
>> https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/JsonPath.java#L-445-505
>>
>> It looks like the problem is that you are passing in empty strings: 
>> https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/internal/JsonReader.java#L52
>>
>>
>> https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/internal/Utils.java#L159-167
>>
>> Any reason not to use a Clojure library like cheshire for JSON?
>>
>>
>>   -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Penumbra anyone in clojure 1.5.1

2014-01-27 Thread Kuba Roth
ok I think got it working at least black frame shows up.


On Monday, January 27, 2014 12:51:45 PM UTC-8, Kuba Roth wrote:
>
> Hi there,
> I'm trying to get Penumbra working with clojure 1.5.1 and was wondering if 
> there is still anyone using that library...?
>
> Also I've just discovered a fork of penumbra in the clojars (
> https://clojars.org/prismofeverything/penumbra/versions/0.6.12) which 
> claims to be compatible with clojure 1.3, adn address some changes to 
> lein2. Is that version preferable to the original git? So far I have had 
> not luck with any.
>
> The ('use penumbra.opengl) line gives the following error: 
> CompilerException java.lang.ClassNotFoundException: penumbra.opengl, 
> compiling:(NO_SOURCE_PATH:1:1) 
>
> Does that mean the native library can not be found or perhaps I'm missing 
> something in project.clj?
>
>   :dependencies [[org.clojure/clojure "1.5.1"]
>  [prismofeverything/penumbra "0.6.12"]]
>   :jvm-opts ["-Djava.library.path=./target/native/linux"]
>
>
> Checking ./target/native/linux indicates some native lib do exist there, 
> but ./target/classes folder is empty. I assume all the jars are loaded now 
> from ~/.m2/repository/prismofeverything/penumbra/0.6.12 (in my case)
>
> Thanks for help,
>
> kuba
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ClojureScript] Re: ANN: Om 0.3.0

2014-01-27 Thread David Pidcock
Well at least I can know guess at the etymology : sql join leaps to mind,  
joining on a different "branch" of the state tree with keys from another branch.

I didn't understand that until I read your tutorial.

On Monday, January 27, 2014 10:35:54 AM UTC-8, David Nolen wrote:
> om/join is conceptually quite cool, but it actually needs some serious work 
> as alluded - currently you're likely to run into some nasty surprises if you 
> really try to use it. The tutorials aren't going to proceed until this is 
> addressed sometime this week.
> 
> 
> 
> David
> 
> 

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Looking for a reference binary parsing

2014-01-27 Thread Aaron Cohen
Have you already looked into using https://code.google.com/p/mp4parser/ ?



On Fri, Jan 24, 2014 at 10:08 AM, Kashyap CK  wrote:

> Hi,
> I need to write a parser for MP4 - essentially, read an MP4 file and
> create an in-memory representation of its structure.
> I'd appreciate it very much if I could get some suggestions on libraries
> that I could use for this.
> Is there a https://github.com/youngnh/parsatron like library that works
> on binary files as well?
> Regards,
> Kashyap
>
> --
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Large File Processing] What am I doing wrong?

2014-01-27 Thread Curtis Gagliardi
If ordering isn't important, I'd just dump them all into a set instead of 
manually checking whether or or not you already put the url into a set. 


On Sunday, January 26, 2014 10:46:46 PM UTC-8, danneu wrote:
>
> I use line-seq, split, and destructuring to parse large CSVs.
>
> Here's how I'd approach what I think you're trying to do:
>
> (with-open [rdr (io/reader (io/resource csv :encoding "UTF-16"))]
> (let [extract-url-hash (fn [line]
>  (let [[_ _ _ url & _] (str/split line 
> #"\t")]
>[(m/md5 url) url]))]
>   (->> (drop 1 (line-seq rdr))
>(map extract-url-hash)
>(into {}
>
> https://gist.github.com/danneu/8644022
>
> On Tuesday, January 21, 2014 12:55:00 AM UTC-6, Jarrod Swart wrote:
>>
>> I'm processing a large csv with Clojure, honestly not even that big (~18k 
>> rows, 11mb).  I have a list of exported data from a client and I am 
>> de-duplicating URLs within the list.  My final output is a series of 
>> vectors: [url url-hash].
>>
>> The odd thing is how slow it seems to be going.  I have tried 
>> implementing this as a reduce, and finally I thought to speed things up I 
>> might try a "with-open and a loop-recur".  It doesn't seem to have done 
>> much in my case.  I know I am doing something wrong I'm just not sure what 
>> yet.  The best I can do is about 4 seconds, which may only seem slow 
>> because I implemented it in python first and it takes a half second to 
>> finish.  Still this is one of the smaller files I will likely deal with so 
>> I'm worried that as the files grow it may get too slow.
>>
>> The code is here on ref-heap for easy viewing: 
>> https://www.refheap.com/26098
>>
>> Any advice is appreciated.
>>
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Looking for a reference binary parsing

2014-01-27 Thread danneu
ztellman's Gloss is magic to me.

- Here's an example of my first attempt to use Gloss to parse the Bitcoin 
protocol: https://gist.github.com/danneu/7397350 -- In 2-chan.clj, it 
demonstrates using ztellman's Aleph to send Bitcoin's verack handshake to a 
node and ask it for blocks.
- Bitcoin protocol specs are described here: 
https://en.bitcoin.it/wiki/Protocol_specification
- The hardest part of the protocol was 
https://en.bitcoin.it/wiki/Protocol_specification#Variable_length_integer, 
but Gloss makes it easy.
- The latest version of my code is here (
https://github.com/danneu/chaingun/blob/master/src/chaingun/codec2.clj) but 
it became coupled to my Datomic entities, so it's perhaps more confusing.

I wasn't able to find any easy to follow real-world examples back when I 
was checking it out, so hopefully that helps someone. 

The amount of time Gloss has saved me is dumbfounding.




On Friday, January 24, 2014 9:08:52 AM UTC-6, Kashyap CK wrote:
>
> Hi,
> I need to write a parser for MP4 - essentially, read an MP4 file and 
> create an in-memory representation of its structure.
> I'd appreciate it very much if I could get some suggestions on libraries 
> that I could use for this.
> Is there a https://github.com/youngnh/parsatron like library that works 
> on binary files as well?
> Regards,
> Kashyap
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Penumbra anyone in clojure 1.5.1

2014-01-27 Thread Kuba Roth
Hi there,
I'm trying to get Penumbra working with clojure 1.5.1 and was wondering if 
there is still anyone using that library...?

Also I've just discovered a fork of penumbra in the clojars 
(https://clojars.org/prismofeverything/penumbra/versions/0.6.12) which 
claims to be compatible with clojure 1.3, adn address some changes to 
lein2. Is that version preferable to the original git? So far I have had 
not luck with any.

The ('use penumbra.opengl) line gives the following error: 
CompilerException java.lang.ClassNotFoundException: penumbra.opengl, 
compiling:(NO_SOURCE_PATH:1:1) 

Does that mean the native library can not be found or perhaps I'm missing 
something in project.clj?

  :dependencies [[org.clojure/clojure "1.5.1"]
 [prismofeverything/penumbra "0.6.12"]]
  :jvm-opts ["-Djava.library.path=./target/native/linux"]


Checking ./target/native/linux indicates some native lib do exist there, 
but ./target/classes folder is empty. I assume all the jars are loaded now 
from ~/.m2/repository/prismofeverything/penumbra/0.6.12 (in my case)

Thanks for help,

kuba

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Helping newcomers get involved in Clojure projects

2014-01-27 Thread Bridget
That's a great idea. Someone should do that. At the very least, remote 
pairing is a good idea for mentoring people to help with a project.

On Saturday, January 25, 2014 2:48:06 PM UTC-5, Marcus Blankenship wrote:
>
> +1
>
> One idea: what about doing some remote pairing and "virtual hackathon" 
> sessions which let people work together?  I went to a hackathon this 
> weekend and it seems like a great way to learn. 
>
> Thanks,
> Marcus
>
> Marcus Blankenship
> 541-805-2736
>
> On Jan 25, 2014, at 11:24 AM, Mimmo Cosenza 
> > 
> wrote:
>
> +1
>
> On Jan 25, 2014, at 7:54 PM, Bridget > 
> wrote:
>
> OpenHatch has this great 
> initiativefor encouraging newcomers 
> to get involved with open source projects. You 
> tag some issues in your bug tracker as "newcomer" or "easy". This provides 
> a gentle path into contributing. There is some work involved with this. You 
> have to do the tagging, and there needs to be some capacity in your project 
> for some mentoring.
>
> Leiningen is doing this  already with "newbie" 
> tagged issues, which is awesome.
>
> Are there any other Clojure projects that are doing this? Would you like 
> to do this with your project? If so, I can try to help. I have been 
> spending a lot of time thinking about the Clojure newcomer perspective 
> lately, and I'd like to work on some things that help smooth that path.
>
> Bridget
>
> -- 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com 
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+u...@googlegroups.com .
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: MODERATION? (was: Informatica Online Training By Highly Experienced & Certified Trainers

2014-01-27 Thread Sean Corfield
Thanks for the clarification Andy. Maybe someone accidentally clicked the 
"approve" button instead of the "spam" button...

Sean

On Jan 27, 2014, at 12:03 PM, Andy Fingerhut  wrote:
> There *is* a first post moderation policy in place for this group -- it has 
> been in place for years, I think.  I have been a moderator for over a year 
> now.
> 
> There are many moderators.  It only takes 1 moderator to OK a message for it 
> to be posted.  This may be a case of moderator education on appropriate 
> messages for the group.  I have deleted some similar messages recently, but 
> someone else must have approved this message, because I did not.
> 
> Andy
> 
> 
> On Mon, Jan 27, 2014 at 12:01 PM, Sean Corfield  wrote:
> SunitLabs has been spamming a lot of technical lists lately.
> 
> Do we need a first post moderation policy in place for this group? That seems 
> to stop spam in other groups I use (& moderate) although it does place more 
> of a burden on moderators.
> 
> Sean
> 
> On Jan 27, 2014, at 1:29 AM, Sairam Shankar  wrote:
> 
>> Sun IT Labs provides the best Software’s training for various Computer IT 
>> courses through Webex, Gotomeeting. We are providing Informatica Training 
>> based on specific needs of the learners especially we will give innovative 
>> one to one Classes which has great opportunities in the present IT market. 
>> We also provides Class room course to contend with today’s competitive IT 
>> world. 
>> 
>> Please call us for the Demo Classes we have regular batches and weekend 
>> batches.
>> 
>> Contact Number : India :+91 9030928000,
>> 
>> Email : i...@sunitlabs.com ,
>> 
>> Web: http://sunitlabs.com/informatica-online-training/
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Helping newcomers get involved in Clojure projects

2014-01-27 Thread Bridget
On Saturday, January 25, 2014 2:13:35 PM UTC-5, Jarrod Swart wrote:
>
> I have been spending a lot of time thinking about the Clojure newcomer 
>> perspective lately, and I'd like to work on some things that help smooth 
>> that path.
>
>
> I've been thinking about this as well, and I would love to hear your 
> thoughts.  Please elaborate! 
>

I have a lot of thoughts. First, I'm working on 
ClojureBridge, 
which I hope will be one way to help newcomers enter the community. But 
then where do they go from there? There are all kinds of good learning 
resources there: a number of great books, 4clojure, videos, for-pay 
training, etc. I don't know how useful those resources are for true 
beginners - either absolute beginner programmers or programmers totally new 
to functional programming. Aphyr's Clojure From the Ground Up and Daniel 
Higginbotham's Clojure for the Brave and True make some great headway in 
that direction, I believe. We can get creative and do even more. 

Happy to hear your thoughts, too.
 

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: MODERATION? (was: Informatica Online Training By Highly Experienced & Certified Trainers

2014-01-27 Thread Andy Fingerhut
There *is* a first post moderation policy in place for this group -- it has
been in place for years, I think.  I have been a moderator for over a year
now.

There are many moderators.  It only takes 1 moderator to OK a message for
it to be posted.  This may be a case of moderator education on appropriate
messages for the group.  I have deleted some similar messages recently, but
someone else must have approved this message, because I did not.

Andy


On Mon, Jan 27, 2014 at 12:01 PM, Sean Corfield  wrote:

> SunitLabs has been spamming a lot of technical lists lately.
>
> Do we need a first post moderation policy in place for this group? That
> seems to stop spam in other groups I use (& moderate) although it does
> place more of a burden on moderators.
>
> Sean
>
> On Jan 27, 2014, at 1:29 AM, Sairam Shankar 
> wrote:
>
> Sun IT Labs provides the best Software's training for various Computer IT
> courses through Webex, Gotomeeting. We are providing Informatica 
> Trainingbased on specific 
> needs of the learners especially we will give innovative
> one to one Classes which has great opportunities in the present IT market.
> We also provides Class room course to contend with today's competitive IT
> world.
>
> Please call us for the Demo Classes we have regular batches and weekend
> batches.
>
> Contact Number : India :+91 9030928000,
>
> Email : i...@sunitlabs.com ,
>
> Web: http://sunitlabs.com/informatica-online-training/
>
>
>
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: need help reading blob column from oracle

2014-01-27 Thread Sean Corfield
I would expect that you can extend one of the protocols to do this more easily?

http://clojure-doc.org/articles/ecosystem/java_jdbc/using_sql.html#protocol-extensions-for-transforming-values

Sean

On Jan 27, 2014, at 12:08 AM, Niels van Klaveren  
wrote:
> For reading a single blob you need to get the field's characterstream, make 
> it a reader and then process it further.
> 
> (jdbc/query c  ["select field from table" parameters]
>  :row-fn (fn [r] (some-> r
>  :fieldidentifier
>  .getCharacterStream
>   io/reader
>   (further processing 
> fns)
> 
> The some-> is needed because row-fn is done on all rows, and if the field is 
> null this would throw a NPE.
> 
> Regards,
> 
> Niels
> 
> On Monday, January 27, 2014 5:21:18 AM UTC+1, bww00...@yahoo.com wrote:
> ANyone have some examples reading a blob column from an oracle db.
> 
> We have a database with a blob column.
> A entity can be split acroos multiple rows.
> If there are multiple rows we need to read anc concatenate the rows into a 
> single buffer
> There may be multiple rows that we need to read to concatnate the blobs in 
> this row set 
> 
> any help would be appreciated
> 
> Thanks
> bryan



signature.asc
Description: Message signed with OpenPGP using GPGMail


MODERATION? (was: Informatica Online Training By Highly Experienced & Certified Trainers

2014-01-27 Thread Sean Corfield
SunitLabs has been spamming a lot of technical lists lately.

Do we need a first post moderation policy in place for this group? That seems 
to stop spam in other groups I use (& moderate) although it does place more of 
a burden on moderators.

Sean

On Jan 27, 2014, at 1:29 AM, Sairam Shankar  wrote:

> Sun IT Labs provides the best Software’s training for various Computer IT 
> courses through Webex, Gotomeeting. We are providing Informatica Training 
> based on specific needs of the learners especially we will give innovative 
> one to one Classes which has great opportunities in the present IT market. We 
> also provides Class room course to contend with today’s competitive IT world. 
> 
> Please call us for the Demo Classes we have regular batches and weekend 
> batches.
> 
> Contact Number : India :+91 9030928000,
> 
> Email : i...@sunitlabs.com ,
> 
> Web: http://sunitlabs.com/informatica-online-training/




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [ClojureScript] Re: ANN: Om 0.3.0

2014-01-27 Thread Rudi Engelbrecht
Hi David

I managed to fix it by:

1. Changing project.clj to use om 0.3.0
2. lein cljsbuild clean

Thanks a lot for following up ;-)

I am enjoying working in Om/React with ClojureScript ;-)

On 28/01/2014, at 5:23 AM, David Pidcock  wrote:

> Did you get this fixed Rudi? 
> If your project file requires om 0.2.3,  then it was something with the lein 
> new command (which is now fixed). 
> I recommend manually changing the project file to require om 0.3.0 and then 
> don't forget to "lein cljscript clean" before recompiling  (which I did). 
>  
> 
> On Saturday, January 25, 2014 1:41:54 PM UTC-8, Rudi Engelbrecht wrote:
> Hi David
> 
> Thank you for a great tutorial!
> 
> I really enjoyed working through your Tutorial on LightTable and Om. 
> 
> A note: In my environment the contact is being deleted when the contact-view 
> has the following code
> (defn contact-view [contact owner]
>   (reify
> om/IRenderState
> (render-state [this {:keys [delete]}]
>   (dom/li nil
> (dom/span nil (display-name contact))
> (dom/button #js {:onClick (fn [e] (put! delete contact))} 
> "Delete")
> 
> 
> 
> and not when it is the following:
> (defn contact-view [contact owner]
>   (reify
> om/IRenderState
> (render-state [this {:keys [delete]}]
>   (dom/li nil
> (dom/span nil (display-name contact))
> (dom/button #js {:onClick (fn [e] (put! delete @contact))} 
> "Delete")
> So the change to
> (put! delete @contact)
> has the effect of the delete button not working anymore.
> 
> I will investigate further.
> 
> Kind regards
> 
> Rudi
> 
>> On Jan 25, 2014, at 11:16 AM, David Nolen  wrote:
>> 
>> A few minor simplifications to the Om model in this release. A breaking 
>> change if you were using om.core/bind, om.core/pure-bind or om.core/read - 
>> these complications have been removed.
>> 
>> There's also now a tutorial optimized for Light Table for people want to 
>> understand the Om approach to React without losing time cobbling together a 
>> working environment: http://github.com/swannodette/om/wiki/Tutorial
>> 
>> Have fun!
>> 
>> David
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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+u...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com.
>> For more options, visithttps://groups.google.com/groups/opt_out.
> 
> 
> -- 
> Note that posts from new members are moderated - please be patient with your 
> first post.
> --- 
> You received this message because you are subscribed to the Google Groups 
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ClojureScript] Re: ANN: Om 0.3.0

2014-01-27 Thread David Nolen
om/join is conceptually quite cool, but it actually needs some serious work
as alluded - currently you're likely to run into some nasty surprises if
you really try to use it. The tutorials aren't going to proceed until this
is addressed sometime this week.

David


On Mon, Jan 27, 2014 at 1:28 PM, David Pidcock  wrote:

> I'm a big fan of this new tutorial.
> It hi-lights some of the benefits of cursors, and I actually realize how I
> might use om/join suddenly :D
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ClojureScript] ANN: Om 0.3.0

2014-01-27 Thread Jamie Orchard-Hays
looking forward to working through the new stuff later this week.
On Jan 26, 2014, at 10:19 PM, David Nolen  wrote:

> Glad to hear it. I recommend taking a look at the new section "Higher Order 
> Components" 
> http://github.com/swannodette/om/wiki/Tutorial#wiki-higher-order-components, 
> we're finally getting to the "good stuff" IMO :)
> 
> David
> 
> 
> On Sun, Jan 26, 2014 at 9:59 PM, Jamie Orchard-Hays  
> wrote:
> :) Worked through the Om tutorial today. Thanks much, David. Good stuff. 
> 
> On Jan 26, 2014, at 8:54 PM, David Nolen  wrote:
> 
>> Ah good point, I've clarified the tutorial.
>> 
>> 
>> On Sun, Jan 26, 2014 at 8:40 PM, Ivan Kozik  wrote:
>> I'm not Jamie, but I had to read that a few times to realize "list and
>> lazy sequences are not allowed" is another sentence, not a
>> continuation of the list of things that are allowed.
>> 
>> On Mon, Jan 27, 2014 at 1:35 AM, David Nolen  wrote:
>> > What is unclear?
>> >
>> >
>> > On Sun, Jan 26, 2014 at 5:08 PM, Jamie Orchard-Hays 
>> > wrote:
>> >>
>> >> David, there's a confusing sentence in the paragraph before the
>> >> om.core/root header:
>> >>
>> >> "Everything in the atom should be an associative data structure - either a
>> >> ClojureScript map or indexed sequential data structure such as a vector,
>> >> list and lazy sequences are not allowed."
>> >>
>> >>
>> >> On Jan 26, 2014, at 11:19 AM, mynomoto  wrote:
>> >>
>> >> > Hi wuqi...@gmail.com,
>> >> >
>> >> > You can just open the file. I got some blank pages when for some reason
>> >> > I wasn't able to reach fb.me. Check your Network tab in the developer 
>> >> > tools.
>> >> >
>> >> > On Sunday, January 26, 2014 6:12:52 AM UTC-2, wuqi...@gmail.com wrote:
>> >> >> On Saturday, January 25, 2014 8:16:15 AM UTC+8, David Nolen wrote:
>> >> >>
>> >> >>> A few minor simplifications to the Om model in this release. A
>> >> >>> breaking change if you were using om.core/bind, om.core/pure-bind or
>> >> >>> om.core/read - these complications have been removed.
>> >> >>
>> >> >>>
>> >> >>
>> >> >>>
>> >> >>
>> >> >>> There's also now a tutorial optimized for Light Table for people want
>> >> >>> to understand the Om approach to React without losing time cobbling 
>> >> >>> together
>> >> >>> a working environment: http://github.com/swannodette/om/wiki/Tutorial
>> >> >>
>> >> >>>
>> >> >>
>> >> >>>
>> >> >>
>> >> >>>
>> >> >>
>> >> >>> Have fun!
>> >> >>
>> >> >>>
>> >> >>
>> >> >>>
>> >> >>
>> >> >>>
>> >> >>
>> >> >>> David
>> >> >>
>> >> >>
>> >> >>
>> >> >> I following the tutorial. After I opened index.html, the page is empty
>> >> >> without any word. This is different from what said in the tutorial. 
>> >> >> BTW, I
>> >> >> double clicked the index.html, and then chrome shows the page, is this 
>> >> >> the
>> >> >> right way to open it or need to use some http://.../index.html after 
>> >> >> start
>> >> >> some service?
>> >> >>
>> >> >>
>> >> >>
>> >> >> Once the build has succeeded open index.html in your favorite browser
>> >> >> (we recommend Google Chrome as it has excellent support for source 
>> >> >> maps).
>> >> >> You should see an h1 tag with the text content Hello World! in it.
>> >> >
>> >> > --
>> >> > Note that posts from new members are moderated - please be patient with
>> >> > your first post.
>> >> > ---
>> >> > You received this message because you are subscribed to the Google
>> >> > Groups "ClojureScript" group.
>> >> > To unsubscribe from this group and stop receiving emails from it, send
>> >> > an email to clojurescript+unsubscr...@googlegroups.com.
>> >> > To post to this group, send email to clojurescr...@googlegroups.com.
>> >> > Visit this group at http://groups.google.com/group/clojurescript.
>> >>
>> >> --
>> >> Note that posts from new members are moderated - please be patient with
>> >> your first post.
>> >> ---
>> >> You received this message because you are subscribed to the Google Groups
>> >> "ClojureScript" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send an
>> >> email to clojurescript+unsubscr...@googlegroups.com.
>> >> To post to this group, send email to clojurescr...@googlegroups.com.
>> >> Visit this group at http://groups.google.com/group/clojurescript.
>> >
>> >
>> > --
>> > Note that posts from new members are moderated - please be patient with 
>> > your
>> > first post.
>> > ---
>> > You received this message because you are subscribed to the Google Groups
>> > "ClojureScript" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an
>> > email to clojurescript+unsubscr...@googlegroups.com.
>> > To post to this group, send email to clojurescr...@googlegroups.com.
>> > Visit this group at http://groups.google.com/group/clojurescript.
>> 
>> --
>> Note that posts from new members are moderated - please be patient with your 
>> first post.
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "ClojureScript" group.
>> To unsubscribe from this 

Re: [ClojureScript] Re: ANN: Om 0.3.0

2014-01-27 Thread David Pidcock
I'm a big fan of this new tutorial.
It hi-lights some of the benefits of cursors, and I actually realize how I 
might use om/join suddenly :D

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ClojureScript] Re: ANN: Om 0.3.0

2014-01-27 Thread David Nolen
On Mon, Jan 27, 2014 at 12:48 PM, Mike Haney  wrote:

> I was initially surprised by the implementation in your tutorial using
> multimethods instead of protocols, especially since you are only
> dispatching on a single function.  But as I thought about it more, I
> realized this could be a perfect place for multiple dispatch, i.e. swapping
> components based on multiple pieces of application state.  Powerful stuff!
>

The problem with protocols is that they are type directed - I think for
most user interfaces you want something data directed.

One question - I've tended to shy away from multimethods because of the
> performance hit, but this is a compelling case for their usage.  Just how
> big of a performance hit are we talking about, compared to protocols or
> regular function invocation?


Multimethods are probably 4X-5X slower in ClojureScript then they should
be. I'll probably be looking into optimizing them in the near future.
However using them with Om is fine since they aren't really part of the
inner loop - all the time is going to be spent in React, not your
ClojureScript.

David

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: ANN: Om 0.3.0

2014-01-27 Thread David Pidcock
Did you get this fixed Rudi? 
If your project file requires om 0.2.3,  then it was something with the 
lein new command (which is now fixed). 
I recommend manually changing the project file to require om 0.3.0 and then 
don't forget to "lein cljscript clean" before recompiling  (which I did). 
 

On Saturday, January 25, 2014 1:41:54 PM UTC-8, Rudi Engelbrecht wrote:
>
> Hi David 
>
> Thank you for a great tutorial! 
>
> I really enjoyed working through your Tutorial on LightTable and Om.  
>
> A note: In my environment the contact is being deleted when the 
> contact-view has the following code 
>
> (defn contact-view [contact owner]
>   (reify
> om/IRenderState
> (render-state [this {:keys [delete]}]
>   (dom/li nil
> (dom/span nil (display-name contact))
> (dom/button #js {:onClick (fn [e] (put! delete contact))} 
> "Delete")
>
>
> and not when it is the following: 
>
> (defn contact-view [contact owner]
>   (reify
> om/IRenderState
> (render-state [this {:keys [delete]}]
>   (dom/li nil
> (dom/span nil (display-name contact))
> (dom/button #js {:onClick (fn [e] (put! delete @contact))} 
> "Delete")
>
> So the change to 
>
> (put! delete @contact)
>
> has the effect of the delete button not working anymore. 
>
> I will investigate further. 
>
> Kind regards 
>
> Rudi 
>
> On Jan 25, 2014, at 11:16 AM, David Nolen > 
> wrote: 
>
> A few minor simplifications to the Om model in this release. A breaking 
> change if you were using om.core/bind, om.core/pure-bind or om.core/read - 
> these complications have been removed.
>
> There's also now a tutorial optimized for Light Table for people want to 
> understand the Om approach to React without losing time cobbling together a 
> working environment: http://github.com/swannodette/om/wiki/Tutorial 
>
> Have fun! 
>
> David 
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com 
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+u...@googlegroups.com .
> For more options, visithttps://groups.google.com/groups/opt_out.
>
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Academy Award goes to a literate program

2014-01-27 Thread Gary Johnson
Awesome! Thanks for sharing the link, Tim.

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Java interoperability

2014-01-27 Thread Paul Smith
Hi Jarrod

> Any reason not to use a Clojure library like cheshire for JSON?

Yes, I am probably taking the wrong approach. Is the Clojure way to put the
JSON in Clojure data structures and manipulate it with filters etc?

Many Thanks

Paul


On Mon, Jan 27, 2014 at 3:35 PM, Jarrod Swart  wrote:

> It looks like the method exists to me:
> https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/JsonPath.java#L-445-505
>
> It looks like the problem is that you are passing in empty strings:
> https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/internal/JsonReader.java#L52
>
>
> https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/internal/Utils.java#L159-167
>
> Any reason not to use a Clojure library like cheshire for JSON?
>
>
>   --
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Clojure memory usage

2014-01-27 Thread Anurag Ramdasan
That sounds good. I am running openjdk1.7. I havent tried the tools yet but
I would give it a shot.
I quite like the idea of pedestal and dont want memory issue to be a reason
for me to not use it.

Thanks,
- Anurag Ramdasan.


On Sun, Jan 26, 2014 at 4:13 AM, Sean Corfield  wrote:

> On Jan 25, 2014, at 2:32 PM, Cedric Greevey  wrote:
> > You might want to use the G1 collector (JVM opt UseG1GC) if you're using
> Java 7 as I've heard that the G1 collector gives memory back to the OS more
> readily than the other options.
>
> My experience with Java 7 and the G1 collector in production would not
> support that. However, the G1 collector certainly evens out the sawtooth
> memory usage patterns you often see with the JVM (prior to G1 / Java 7)
> which makes for smoother response times etc.
>
> Sean Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)
>
>
>
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Java interoperability

2014-01-27 Thread Paul Smith
Hi Sam,

Thanks for your response.

I am been following the API documentation:
https://code.google.com/p/json-path/ and the tests
https://github.com/jayway/JsonPath/blob/master/json-path/src/test/java/com/jayway/jsonpath/JsonPathTest.java

But looking at the source their only seems to be a static read method with
a third argument as a filter!

Paul








On Mon, Jan 27, 2014 at 3:27 PM, Sam Ritchie  wrote:

> Where do you see that method?
>
>
> https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/JsonPath.java
>
> Perusing the code, it looks like it doesn't exist.
>
>   Paul Smith 
>  January 27, 2014 8:21 AM
> Hi,
>
> I am attempting to use Java interoperability.
>
> I have downloaded a dependency through Leiningen
>
> [com.jayway.jsonpath/json-path "0.9.1"]
>
> I import the dependency into a namespace
>
> (:import (com.jayway.jsonpath JsonPath)
>
> The Java class, JsonPath has a static method 'read' that takes two
> strings as arguments.
>
> However, when I try to evaluate this expression
>
> (JsonPath/read "" "")
>
> I receive " java.lang.IllegalArgumentException: No matching method: read"
>
> I am unsure on what I am doing wrong here?
>
> Many Thanks
>
> Paul
> --
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> Sam Ritchie (@sritchie)
> Paddleguru Co-Founder
> 703.863.8561
> www.paddleguru.com
> Twitter  // 
> Facebook
>
> --
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<>

Re: Java interoperability

2014-01-27 Thread Jarrod Swart
It looks like the method exists to me: 
https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/JsonPath.java#L-445-505

It looks like the problem is that you are passing in empty strings: 
https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/internal/JsonReader.java#L52

https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/internal/Utils.java#L159-167

Any reason not to use a Clojure library like cheshire for JSON?


 

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Java interoperability

2014-01-27 Thread Angel Java Lopez
Ummm... the methods has a generic T parameter, ie
https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/JsonPath.java#L446

Any way to invoke them, from Clojure?


On Mon, Jan 27, 2014 at 12:27 PM, Sam Ritchie  wrote:

> Where do you see that method?
>
>
> https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/JsonPath.java
>
> Perusing the code, it looks like it doesn't exist.
>
>   Paul Smith 
>  January 27, 2014 8:21 AM
> Hi,
>
> I am attempting to use Java interoperability.
>
> I have downloaded a dependency through Leiningen
>
> [com.jayway.jsonpath/json-path "0.9.1"]
>
> I import the dependency into a namespace
>
> (:import (com.jayway.jsonpath JsonPath)
>
> The Java class, JsonPath has a static method 'read' that takes two
> strings as arguments.
>
> However, when I try to evaluate this expression
>
> (JsonPath/read "" "")
>
> I receive " java.lang.IllegalArgumentException: No matching method: read"
>
> I am unsure on what I am doing wrong here?
>
> Many Thanks
>
> Paul
> --
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> Sam Ritchie (@sritchie)
> Paddleguru Co-Founder
> 703.863.8561
> www.paddleguru.com
> Twitter  // 
> Facebook
>
> --
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<>

Re: equality

2014-01-27 Thread Andy Fingerhut
As Jim already mentioned, you can use == to compare numbers for equality,
but you must be cautious with equality for floating point numbers, as the
tiniest bit of roundoff error will cause = and == to be false for such
comparisons.

For =, there are effectively 3 'categories' of numeric values in Clojure,
each of which can be = to each other within a category, but between
categories values are never = to each other.

Category 1. integer values (including Java Byte, Short, Integer, Long,
BigInteger, and Clojure BigInt types) and ratio values (Clojure's Ratio
type)
Category 2. float and double values (Java Float and Double)
Category 3. BigDecimal

This is better than Java equals(), where Byte and Short are never equals()
to each other, etc.  Two numeric values must be the same Java class for
equals() to be true.

Why the 3 categories, you may wonder?  I didn't design it myself, but my
best guess is that in order to have a hash function (in this case Clojure's
hash, implemented as a Java method called hasheq()) that is consistent with
Clojure =, it is difficult to make such a hash function correct and fast if
there were not these 3 separate categories.

Andy


On Mon, Jan 27, 2014 at 5:39 AM, Eric Le Goff  wrote:

> Newbie question :
>
> user=> (= 42 42)
> true
> user=> (= 42 42.0)
> false
>
> I did not expect last result.
>
> I understand that underlying classes are not the same
> i.e
> user=> (class 42)
> java.lang.Long
> user=> (class 42.0)
> java.lang.Double
>
>
> but anyway I'am surprised
>
> Cheers
>
>
> --
> Eric
>
>  --
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: ANN: clojure-objc

2014-01-27 Thread PublicFarley
Thanks again Gal.

Are you going to throw the new bits up to clojuars or maven.org?

Could not find artifact galdolber:clojure-objc:jar:1.5.1.1 in central 
(http://repo1.maven.org/maven2/)

Could not find artifact galdolber:clojure-objc:jar:1.5.1.1 in clojars 
(https://clojars.org/repo/)



On Sunday, January 26, 2014 9:47:46 PM UTC-5, Gal Dolber wrote:
>
> I reimplemented the interop and its fully functional now.
> Just download the last binary from 
> https://github.com/galdolber/clojure-objc
>
>
> On Sun, Jan 26, 2014 at 6:17 PM, Gal Dolber 
> > wrote:
>
>> That's a bug in the objc interop, the type detection is incomplete.
>>
>>
>> https://github.com/galdolber/clojure-objc/blob/master/src/jvm/clojure/lang/Selector.java?source=c#L87
>>
>> The error you get is happening on arm64(iphone 5s or simulator 64bits), 
>> it should work on i386, armv7 and armv7s.
>>
>>
>> On Sun, Jan 26, 2014 at 3:18 PM, PublicFarley 
>> 
>> > wrote:
>>
>>> I got an error as posted in my 1:01 PM post below. I've uploaded my 
>>> source in case it helps. Basically it's your github sample code.
>>>
>>>
>>> On Sunday, January 26, 2014 8:15:17 AM UTC-5, Gal Dolber wrote:
>>>
 I added a better sample with a UINavigationController and a small uikit 
 framework(very very alpha).

 https://github.com/galdolber/clojure-objc-sample/blob/
 master/src/clojure_objc_sample/core.clj

 Feedback and improvements on the uikit framework are very much welcome.


 On Sat, Jan 25, 2014 at 10:08 PM, PublicFarley wrote:

> Thanks for the quick reply Gal. Excellent advise. I never thought to 
> do it that way. Need to stretch my thinking a bit... LOL.
>
> Yes your compilation technology could enable a lot of creative 
> thinking around frameworks and libraries for iOS UI construction in 
> Clojure. Much like the excitement and development in the RubyMotion 
> community. I need to put my hard hat on and experiment more.
>
> Again thanks for the fabulous contribution.
>
> Kind Regards,
> publicfarley
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google 
> Groups "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to clojure+u...@googlegroups.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

  -- 
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@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+u...@googlegroups.com 
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to clojure+u...@googlegroups.com .
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Java interoperability

2014-01-27 Thread Sam Ritchie

Where do you see that method?

https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/JsonPath.java

Perusing the code, it looks like it doesn't exist.


Paul Smith 
January 27, 2014 8:21 AM
Hi,

I am attempting to use Java interoperability.

I have downloaded a dependency through Leiningen

[com.jayway.jsonpath/json-path "0.9.1"]

I import the dependency into a namespace

(:import (com.jayway.jsonpath JsonPath)

The Java class, JsonPath has a static method 'read' that takes two
strings as arguments.

However, when I try to evaluate this expression

(JsonPath/read "" "")

I receive " java.lang.IllegalArgumentException: No matching method: read"

I am unsure on what I am doing wrong here?

Many Thanks

Paul
--
--
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google 
Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com 
Twitter // Facebook 



--
--
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<>

Java interoperability

2014-01-27 Thread Paul Smith
Hi,

I am attempting to use Java interoperability.

I have downloaded a dependency through Leiningen

[com.jayway.jsonpath/json-path "0.9.1"]

I import the dependency into a namespace

(:import (com.jayway.jsonpath JsonPath)

The Java class, JsonPath has a static method 'read' that takes two
strings as arguments.

However, when I try to evaluate this expression

(JsonPath/read "" "")

I receive " java.lang.IllegalArgumentException: No matching method: read"

I am unsure on what I am doing wrong here?

Many Thanks

Paul

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Helping newcomers get involved in Clojure projects

2014-01-27 Thread Michael Klishin
Bridget:
>
> Are there any other Clojure projects that are doing this?
>

Some ClojureWerkz [1] projects do, and eventually all key ones will.

1. http://clojurewerkz.org

MK 

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Helping newcomers get involved in Clojure projects

2014-01-27 Thread Bart Spiers
Great initiative!
I've been having the problem of not knowing what project to get into as it 
often seems daunting. On the one hand, there are a ton of projects, on the 
other hand, I have no clue where I actually might be able to help. 

I'm sure a lot of other people experience the same.


On Monday, January 27, 2014 3:28:01 PM UTC+1, Tim Visher wrote:
>
> On Sat, Jan 25, 2014 at 1:54 PM, Bridget > 
> wrote: 
> > OpenHatch has this great initiative for encouraging newcomers to get 
> > involved with open source projects. You tag some issues in your bug 
> tracker 
> > as "newcomer" or "easy". This provides a gentle path into contributing. 
> > There is some work involved with this. You have to do the tagging, and 
> there 
> > needs to be some capacity in your project for some mentoring. 
> > 
> > Leiningen is doing this already with "newbie" tagged issues, which is 
> > awesome. 
> > 
> > Are there any other Clojure projects that are doing this? Would you like 
> to 
> > do this with your project? If so, I can try to help. I have been 
> spending a 
> > lot of time thinking about the Clojure newcomer perspective lately, and 
> I'd 
> > like to work on some things that help smooth that path. 
>
> This is a great idea! 
>
> -- 
>
> In Christ, 
>
> Timmy V. 
>
> http://blog.twonegatives.com/ 
> http://five.sentenc.es/ -- Spend less time on mail 
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Helping newcomers get involved in Clojure projects

2014-01-27 Thread Tim Visher
On Sat, Jan 25, 2014 at 1:54 PM, Bridget  wrote:
> OpenHatch has this great initiative for encouraging newcomers to get
> involved with open source projects. You tag some issues in your bug tracker
> as "newcomer" or "easy". This provides a gentle path into contributing.
> There is some work involved with this. You have to do the tagging, and there
> needs to be some capacity in your project for some mentoring.
>
> Leiningen is doing this already with "newbie" tagged issues, which is
> awesome.
>
> Are there any other Clojure projects that are doing this? Would you like to
> do this with your project? If so, I can try to help. I have been spending a
> lot of time thinking about the Clojure newcomer perspective lately, and I'd
> like to work on some things that help smooth that path.

This is a great idea!

--

In Christ,

Timmy V.

http://blog.twonegatives.com/
http://five.sentenc.es/ -- Spend less time on mail

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: equality

2014-01-27 Thread Jim - FooBar();

Use `==` instead:

user=> (== 42 42.0)
true
user=> (== 42 42M)
true

Jim


On 27/01/14 13:41, Dennis Haupt wrote:

one does not simply compare floating point numbers for equality


2014-01-27 Eric Le Goff mailto:eleg...@gmail.com>>

Newbie question :

user=> (= 42 42)
true
user=> (= 42 42.0)
false

I did not expect last result.

I understand that underlying classes are not the same
i.e
user=> (class 42)
java.lang.Long
user=> (class 42.0)
java.lang.Double


but anyway I'am surprised

Cheers


--
Eric

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to clojure+unsubscr...@googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.


--
--
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google 
Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


--
--
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: equality

2014-01-27 Thread Dennis Haupt
one does not simply compare floating point numbers for equality


2014-01-27 Eric Le Goff 

> Newbie question :
>
> user=> (= 42 42)
> true
> user=> (= 42 42.0)
> false
>
> I did not expect last result.
>
> I understand that underlying classes are not the same
> i.e
> user=> (class 42)
> java.lang.Long
> user=> (class 42.0)
> java.lang.Double
>
>
> but anyway I'am surprised
>
> Cheers
>
>
> --
> Eric
>
>  --
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


equality

2014-01-27 Thread Eric Le Goff
Newbie question :

user=> (= 42 42)
true
user=> (= 42 42.0)
false

I did not expect last result.

I understand that underlying classes are not the same
i.e
user=> (class 42)
java.lang.Long
user=> (class 42.0)
java.lang.Double


but anyway I'am surprised

Cheers


--
Eric

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Recommendations for parsing/validating a JSON structure

2014-01-27 Thread David Simmons
Thanks Korny. I'll take a look.

cheers

Dave

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Recommendations for parsing/validating a JSON structure

2014-01-27 Thread Korny Sietsma
Parsing is easy - use either https://github.com/clojure/data.json or
https://github.com/dakrone/cheshire (Cheshire used to have some advantages
over data.json but I have the impression data.json has caught up).

For validation I've used Prismatic Schema -
https://github.com/prismatic/schema - it's good for structural validation,
correct data types, valid keys etc.  If you want user-friendly validation
failures for individual fields you might want to use something more
user-focused - there are quite a few validation libraries at
http://www.clojure-toolbox.com/ you could try.

- Korny
On 27 Jan 2014 12:17, "David Simmons"  wrote:

> Hi Folks.
>
> I'm writing a web app which receives a JSON structure. I'd like to
> validate that the structure is correct i.e. mandatory fields are present,
> and then convert into the relevant Clojure data structure. As a bonus if  a
> particular field in the JSON structure is incorrect I'd like to be able to
> define the error message generated (in a similar way I can do for
> noir.validation).
>
> Does anyone have any recommended libraries or the best way to approach
> this issue - I'm sure I'm not the first with this requirement.
>
> cheers
>
> Dave
>
> --
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Recommendations for parsing/validating a JSON structure

2014-01-27 Thread David Simmons
Hi Folks.

I'm writing a web app which receives a JSON structure. I'd like to validate 
that the structure is correct i.e. mandatory fields are present, and then 
convert into the relevant Clojure data structure. As a bonus if  a 
particular field in the JSON structure is incorrect I'd like to be able to 
define the error message generated (in a similar way I can do for 
noir.validation).

Does anyone have any recommended libraries or the best way to approach this 
issue - I'm sure I'm not the first with this requirement.

cheers

Dave

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How to place unicode characters in span tag in reagent (formerly known as cloact)

2014-01-27 Thread Sunil S Nandihalli
Thanks cedric, what you suggested worked. however, the only thing was that
I had to use "\u" and not "\U"

Sunil.


On Mon, Jan 27, 2014 at 4:51 PM, Cedric Greevey  wrote:

> So, the source code for the web page says ↺ then? It may be
> already being entity escaped. Try just [:span "\U"] with the
> appropriate code (maybe the same one, 8634) for  and see if that works.
>
>
> On Mon, Jan 27, 2014 at 6:15 AM, Sunil S Nandihalli <
> sunil.nandiha...@gmail.com> wrote:
>
>> Hi Everybody,
>>  Can somebody help me figure out as to how I can place a unicode
>> character. What I have
>> tried is [:span "↺"] with the correct header but it renders it
>> as-is.
>>
>> Thanks,
>> Sunil.
>>
>> --
>> --
>> 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, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: simple-check gen/boolean Only Returning false

2014-01-27 Thread Michael Daines
Awesome turnaround, Thanks.

I was kinda worried I was nuts or about to do some urandom debugging.

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How to place unicode characters in span tag in reagent (formerly known as cloact)

2014-01-27 Thread Cedric Greevey
So, the source code for the web page says ↺ then? It may be
already being entity escaped. Try just [:span "\U"] with the
appropriate code (maybe the same one, 8634) for  and see if that works.


On Mon, Jan 27, 2014 at 6:15 AM, Sunil S Nandihalli <
sunil.nandiha...@gmail.com> wrote:

> Hi Everybody,
>  Can somebody help me figure out as to how I can place a unicode
> character. What I have
> tried is [:span "↺"] with the correct header but it renders it
> as-is.
>
> Thanks,
> Sunil.
>
> --
> --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


How to place unicode characters in span tag in reagent (formerly known as cloact)

2014-01-27 Thread Sunil S Nandihalli
Hi Everybody,
 Can somebody help me figure out as to how I can place a unicode character.
What I have
tried is [:span "↺"] with the correct header but it renders it as-is.

Thanks,
Sunil.

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Help about using clojure in org mode in Emacs with CIDER

2014-01-27 Thread Bastien
Hi Phill,

can you repost this on the emacs-orgmode mailing list?
https://lists.gnu.org/mailman/listinfo/emacs-orgmode

I'll follow-up there.

Thanks in advance,

-- 
 Bastien

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Informatica Online Training By Highly Experienced & Certified Trainers

2014-01-27 Thread Sairam Shankar
Sun IT Labs provides the best Software’s training for various Computer IT 
courses through Webex, Gotomeeting. We are providing Informatica 
Trainingbased on specific 
needs of the learners especially we will give innovative 
one to one Classes which has great opportunities in the present IT market. 
We also provides Class room course to contend with today’s competitive IT 
world. 

Please call us for the Demo Classes we have regular batches and weekend 
batches.

Contact Number : India :+91 9030928000,

Email : i...@sunitlabs.com ,

Web: http://sunitlabs.com/informatica-online-training/

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


A question for TDD practitioners

2014-01-27 Thread Mimmo Cosenza
I do not practice TDD a lot, but I think that thanks to recent events 
clojurescript will attract people more sensible to TDD workflows.

Due to a limitation of austin and clojurescript.test regarding :none 
optimisation, it's not possible to use it with them. So we have to switch to 
:whitespace (or one of the others). 

But if we use :whitespace (or one of the others optimisation options) its 
compilation/recompilation time it's very slow compared to :none when paired 
with :source-map. 

By renouncing to :source-map option, the :whitespace compilation/re-compilation 
time is very fast again.

The question for TDD practitioners is the following:

How fundamental is the availability of cljs's source-map in a TDD workflow? 
Could we renounce to it in favour of a quicker TDD loop? Do you see any 
drawback in a TDD scenario for not having the source-map?

Honestly, I use source-map rarely (never in a TDD workflow) and only for 
debugging purpose because it allows me to set breakpoints and inspect bindings. 
It seems to me that renouncing to source-map in a TDD workflow is not a big 
deal. 

Am I correct?

Thanks

Mimmo

 





 


 


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: need help reading blob column from oracle

2014-01-27 Thread Niels van Klaveren
Oops, above example is for a clob, change .getCharacterStream to 
.getBinaryStream for a true blob.

On Monday, January 27, 2014 9:08:30 AM UTC+1, Niels van Klaveren wrote:
>
> For reading a single blob you need to get the field's characterstream, 
> make it a reader and then process it further.
>
> (jdbc/query c  ["select field from table" parameters]
>  :row-fn (fn [r] (some-> r
>  :fieldidentifier
>  .getCharacterStream
>   io/reader
>   (further processing 
> fns)
>
> The some-> is needed because row-fn is done on all rows, and if the field 
> is null this would throw a NPE.
>
> Regards,
>
> Niels
>
> On Monday, January 27, 2014 5:21:18 AM UTC+1, bww00...@yahoo.com wrote:
>>
>> ANyone have some examples reading a blob column from an oracle db.
>>
>> We have a database with a blob column.
>> A entity can be split acroos multiple rows.
>> If there are multiple rows we need to read anc concatenate the rows into 
>> a single buffer
>> There may be multiple rows that we need to read to concatnate the blobs 
>> in this row set 
>>
>> any help would be appreciated
>>
>> Thanks
>> bryan
>>
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: need help reading blob column from oracle

2014-01-27 Thread Niels van Klaveren
For reading a single blob you need to get the field's characterstream, make 
it a reader and then process it further.

(jdbc/query c  ["select field from table" parameters]
 :row-fn (fn [r] (some-> r
 :fieldidentifier
 .getCharacterStream
  io/reader
  (further processing 
fns)

The some-> is needed because row-fn is done on all rows, and if the field 
is null this would throw a NPE.

Regards,

Niels

On Monday, January 27, 2014 5:21:18 AM UTC+1, bww00...@yahoo.com wrote:
>
> ANyone have some examples reading a blob column from an oracle db.
>
> We have a database with a blob column.
> A entity can be split acroos multiple rows.
> If there are multiple rows we need to read anc concatenate the rows into a 
> single buffer
> There may be multiple rows that we need to read to concatnate the blobs in 
> this row set 
>
> any help would be appreciated
>
> Thanks
> bryan
>

-- 
-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.