How to invoke StaticMethodExpr.eval?

2017-02-04 Thread Jiacai Liu


I am following this series 
 
to learn how clojure compiler works.

I tried to invoke eval method of StaticMethodExpr using below codes

(ns clojure.lang
  (:use clojure.core)
  (:import [clojure.lang Compiler Compiler$C]))

(def form (read-string "(+ 1 1)") )

(def expr (Compiler/analyze Compiler$C/EXPRESSION form))

(.eval expr)

but no luck and throw IllegalArgumentException:

Unhandled java.lang.IllegalArgumentException
   Can't call public method of non-public class: public
   java.lang.Object clojure.lang.Compiler$StaticMethodExpr.eval()

Is there anything I was missing or is this a bug in jdk 
 ?


StackOverflow 
link: 
http://stackoverflow.com/questions/42048786/how-to-invoke-staticmethodexpr-eval


​

-- 
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/d/optout.


[ANN] lambdaroyal-memory: STM-based in-memory database storing persistent data structures

2017-02-04 Thread gixxi
Hi all, I hereby announce the availability of the lambdaroyal-memory. A 
STM-based in-memory database flushing to a persistent backend.

https://github.com/gixxi/lambdaroyal-memory

Just imaging working just with STM refs holding your domain data and ease 
your daily job with


   - indexes
   - foreign keys relations
   - joins & projections
   - parallel search engine
   - extensible data model

while not bothering about persistence which is nicely handles by 
lambdaroyal-memory.

The database is used in production by various of our customers since more 
than a year.

License: FreeBSD

Kind regards
Christian

-- 
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/d/optout.


Re: Clojure.spec, maps, restrict valid keywords, easier way?

2017-02-04 Thread Dave Tenny
I have found eastwood to be useful for a number of things, however on 
keyword checking it failed terribly on our code base, though perhaps there 
have been updates since I last tried it.

Thanks for the suggestion though.

On Friday, February 3, 2017 at 7:26:01 PM UTC-5, Ben Brinckerhoff wrote:
>
> The eastwood linter can also be configured to look for possibly misspelled 
> keyword typos
>
> https://github.com/jonase/eastwood#keyword-typos
>
>>
>>>

-- 
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/d/optout.


Re: Clojure.spec, maps, restrict valid keywords, easier way?

2017-02-04 Thread Colin Fleming
I'm actually planning to do exactly that in Cursive, and it's more or less
what Eastwood does too per the link Ben posted.

On 4 February 2017 at 14:23, Linus Ericsson 
wrote:

> It would be great if an editor highlighted a (possibly qualified) keyword
> that was used only in that particular place (given all code loaded). This
> wouldn't be bullet-proof, but would have highlighted mistakes like
> :encypted (but could still confuse :encrypted? with :encrypted, and
> whatnot).
>
> /Linus
>
> On Friday, February 3, 2017 at 1:49:20 AM UTC+1, tbc++ wrote:
>>
>> A good editor should auto-complete your keywords for you. Since using
>> this feature in Cursive (same sort of thing is available in other editors)
>> the cases where I've mis-spelled a keyword have dropped dramatically. It's
>> a lot harder to mis-spell a keyword when you can just do: :egg/th
>> and the rest is auto-filled.
>>
>> On Thu, Feb 2, 2017 at 5:37 PM, Alex Miller  wrote:
>>
>>> Ugh, don't do that. Introducing layers that add no value is a bad idea.
>>> Just use the keyword directly.
>>>
>>> --
>>> 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/d/optout.
>>>
>>
>>
>>
>> --
>> “One of the main causes of the fall of the Roman Empire was that–lacking
>> zero–they had no way to indicate successful termination of their C
>> programs.”
>> (Robert Firth)
>>
> --
> 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/d/optout.
>

-- 
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/d/optout.